HTML Basics: Tags, Attributes and Structure
29 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What does HTML stand for?

  • Home Tool Management Language
  • Hyper Text Markup Language (correct)
  • Holistic Technical Method Library
  • Hyper Tax Makes Line

Which HTML tag is used to create subscript text, like in Hâ‚‚O?

  • <ul>
  • <br>
  • <sub> (correct)
  • <sup>

What is the purpose of the <a> tag in HTML?

  • Adding hyperlinks (correct)
  • Aligning text
  • Creating audio elements
  • Adding images

Which HTML tag is the correct way to italicize text?

<p><i> (A)</p> Signup and view all the answers

Which action does the <br> tag perform on a webpage?

<p>Insert a line break (C)</p> Signup and view all the answers

Which type of program is usually used to create a HTML file?

<p>Text editor (A)</p> Signup and view all the answers

Which of the following is the correct HTML to create a hyperlink to 'https://www.example.com' with the link text 'Example'?

<p><code>&lt;a href=&quot;https://www.example.com&quot;&gt;Example&lt;/a&gt;</code> (B)</p> Signup and view all the answers

To display x² in HTML, indicating 'x' raised to the power of 2, which tag should be used?

<p><code>&lt;sup&gt;</code> (A)</p> Signup and view all the answers

Which heading tag will produce the largest heading?

<p><code>&lt;h1&gt;</code> (A)</p> Signup and view all the answers

Which HTML tag is used to make text appear bold?

<p><b> (D)</p> Signup and view all the answers

Which HTML tag is used to set the background color of a webpage?

<p><code>&lt;body&gt;</code> (B)</p> Signup and view all the answers

What tag is used to insert an image into a webpage?

<p>img (D)</p> Signup and view all the answers

What does the <hr> tag do to a webpage?

<p>Adds a horizontal ruler (D)</p> Signup and view all the answers

Which of the following HTML snippets is correct for inserting an image?

<p><code>&lt;img src=&quot;image.gif&quot;&gt;</code> (D)</p> Signup and view all the answers

Which image format generally gives the best results for photos on the web?

<p>JPG (D)</p> Signup and view all the answers

What occurs if a background image is smaller than the viewport?

<p>It will be repeated (C)</p> Signup and view all the answers

What is the standard casing for HTML tags?

<p>Not case sensitive (D)</p> Signup and view all the answers

What effect does the <i> tag have on text?

<p>Italic (C)</p> Signup and view all the answers

Why should alternative text be added to images using the 'alt' attribute?

<p>To give users an idea of the image's content before it loads (B)</p> Signup and view all the answers

Which HTML5 element is semantically correct for highlighting text?

<p><code>&lt;mark&gt;</code> (A)</p> Signup and view all the answers

In HTML, how can the dimensions of an image be adjusted?

<p>B and C (D)</p> Signup and view all the answers

In HTML, where should the <title> tag be placed?

<p>Head (D)</p> Signup and view all the answers

Which code shows the correct way to insert a background image in HTML?

<p><code>&lt;body background=&quot;background.jpg&quot;&gt;</code> (D)</p> Signup and view all the answers

Which of the following HTML snippets is the correct way to add a background color to a webpage?

<p><code>&lt;body style = &quot;background-color : yellow&quot;&gt;</code> (C)</p> Signup and view all the answers

How is text displayed when enclosed within the <strong> tag?

<p>Bold (A)</p> Signup and view all the answers

Which one of the following demonstrates the correct HTML syntax for a level 1 heading?

<p><code>&lt;h1&gt;Welcome&lt;/h1&gt;</code> (B)</p> Signup and view all the answers

Which of these options is the correct HTML markup for specifying the document type?

<p><code>&lt;!DOCTYPE html&gt;</code> (B)</p> Signup and view all the answers

Which attribute of the <html> tag specifies the language of the webpage?

<p>Lang (B)</p> Signup and view all the answers

How would you insert a comment in HTML?

<p><code>&lt;!-- Comment --&gt;</code> (A)</p> Signup and view all the answers

Flashcards

What is HTML?

Stands for Hyper Text Markup Language, the standard markup language for creating web pages.

What is the <a> tag for?

The <a> tag is used to create hyperlinks, which are links to other web pages or resources.

What does the <body> tag contain?

The <body> tag contains the visible content of an HTML document.

What does the <i> tag do?

The <i> tag is used to make text italic.

Signup and view all the flashcards

What does the <br> tag do?

The <br> tag inserts a single line break.

Signup and view all the flashcards

What program writes HTML?

Any text editor can be used to write HTML code.

Signup and view all the flashcards

What is the correct HTML for hyperlink?

The correct HTML for creating a hyperlink is: <a href="https://www.gkseries.com">Gkseries.com</a>

Signup and view all the flashcards

What tag raises a number to a power?

The <sup> tag is used to raise a number to a power, like x².

Signup and view all the flashcards

Which tag is the largest heading?

The <h1> tag represents the largest heading.

Signup and view all the flashcards

What does the <b> tag do?

The <b> tag is used to make text bold.

Signup and view all the flashcards

Which tag sets background color?

The <body> tag with the style attribute can set the background color: <body style="background-color: yellow">

Signup and view all the flashcards

Which tag inserts images?

The <img> tag is used to insert images into a web page.

Signup and view all the flashcards

What does '


' tag do?

The <hr> tag is used to create a horizontal ruler.

Signup and view all the flashcards

Correct HTML to insert image?

The correct HTML code for inserting an image is: <img src="image.gif">

Signup and view all the flashcards

Photo file format?

JPG format usually works best for photos.

Signup and view all the flashcards

Small background image behavior?

If the background image is smaller than the screen, it will be repeated.

Signup and view all the flashcards

Are html tags case sensitive?

HTML tags are not case sensitive.

Signup and view all the flashcards

What is the <i> tag for?

The <i> tag makes text italic.

Signup and view all the flashcards

Why add alt text to images?

Alternative text should be added to images so users can understand what the image is before it loads.

Signup and view all the flashcards

Highlight text in HTML5?

The <mark> element is used to highlight text in HTML5.

Signup and view all the flashcards

Change image size

Height and width attributes are used to change the size of an image in HTML.

Signup and view all the flashcards

Where is <title> tag placed?

The <title> tag is placed in the <head> section of an HTML document.

Signup and view all the flashcards

Correct HTML to put into the background?

The correct HTML code for inserting a background image is: <body background="background.jpg">

Signup and view all the flashcards

How to display text in Bold?

Text within the <strong> tag is displayed as bold.

Signup and view all the flashcards

Correct HTML syntax?

The heading tag with the correct HTML syntax is: <h1>Welcome</h1>

Signup and view all the flashcards

Correct HTML declaration?

<!DOCTYPE html> is a correct HTML markup for the document type declaration.

Signup and view all the flashcards

What declares web language?

The lang attribute of the <html> tag declares the language of the Web page.

Signup and view all the flashcards

HTML comment syntax?

<!-- Comment --> is the correct syntax to write an HTML comment.

Signup and view all the flashcards

What is an empty tag?

An empty tag in HTML does not require a closing tag.

Signup and view all the flashcards

How to format HTML text?

<pre> tag is used how to display preformatted text in HTML?

Signup and view all the flashcards

Study Notes

HTML Basics

  • HTML stands for Hyper Text Markup Language.
  • The <a> and </a> tags are used for adding links to a page.
  • The correct HTML for creating a hyperlink is <a href="https://www.gkseries.com">Gkseries.com</a>
  • The correct HTML markup for the document type declaration is <!DOCTYPE html>.
  • The attribute of the <html> tag that declares the language of the Web page is lang.
  • The correct syntax to write an HTML comment is <!-- Comment -->.
  • An empty tag in HTML does not require a closing tag.
  • The <html> tag is called the root element of an HTML document.
  • HTML uses tags defined within the language.
  • A text editor and web browser are necessary to create an HTML page.
  • The alt property allows an image link to show a text label.
  • HTML files are saved by default with the .html extension.
  • The style HTML attribute is used to define inline styles.

HTML Tags and Elements

  • The <sub> HTML tag is used for raising a number to a power like x².
  • The <h1> tag is the correct HTML tag for the largest heading.
  • The <b> tag is the HTML tag to make text bold.
  • The <body> tag can set the background color for a page.
  • The <img> tag inserts images into your web page
  • The <HR> tag is used for a horizontal ruler.
  • The correct HTML code for inserting an image is <img src="image.gif">
  • <i> tag makes text italic.
  • The <u> element is used to get highlighted text in HTML5.
  • The correct way to add a background color to an HTML document is <body style='background-color:pink;'>

Backgrounds and Formatting

  • If the background image is smaller than the screen, it will be repeated.
  • The HTML tags are not case sensitive.
  • Height and width are used To change the size of an image in HTML.
  • The preformatted text is displayed using <pre>.
  • The <del> HTML element is used to show deleted text.

Styles and Properties

  • The HTML style attribute can add styles to an HTML element and uniquely identify specific styles for some element.
  • The tags are used for headings in HTML.
  • The font-family property changes the font of text.
  • The correct syntax of doctype in HTML5 is <!doctype html>.

Webpage Structure

  • Web browsers are used to read and render HTML pages.
  • A URL is a web address.
  • The correct sequence of HTML tags for starting a webpage is <html>, <head>, <title>, <body>

Quotations and Special Elements

  • <abbr> is the HTML element used for abbreviation or acronym.
  • The address element contains contact details for the author.

HTML Forms

  • <textarea> tag creates a multi-line text input area in an HTML Form.
  • <select> tag creates a dropdown in an HTML Form.
  • <input type="checkbox"> creates a checkbox in an HTML Form.
  • The target attribute cannot have a color.
  • _top opens a linked document in the full body.

Target Attribute

  • _parent opens linked document in a parent frame.
  • _blank opens linked document in a new window or tab.

Nesting

  • The correct nesting of HTML elements is "p" inside "body" inside "html".

Exact Quotation

  • blockquote tag indicates that a large passage of text is an exact quotation.

Input Element Type

  • The purpose of the HTML <input> element with the type attribute set to "text" is to create a text input field.
  • Radio is the input type that allows users to select a single option from a list of choices in an HTML form.

Text in Forms

  • To allow users to input multiple lines of text, the HTML <textarea> element is used in a form.
  • action attribute in a <form> element specifies the URL where the form data should be sent.

Submit Button

  • HTML <input> element with the type attribute set to "submit" is used to create a submit button.
  • The method attribute of the <form> element defines the HTTP method for form submission.

Input Type Radio

  • The HTML <input> element with the type attribute set to "radio" in an HTML form creates a radio button.

Attributes for forms

  • The name attribute within form input elements specifies the input element name in an HTML form.
  • The autocomplete attribute in an input element controls whether the browser should suggest and remember form input values in an HTML form.
  • The HTML <input> element with the type attribute set to "checkbox" in an HTML form allows users to select multiple options.
  • The
  • HTML element with the type attribute set to "checkbox" in an HTML form is used to allow users to select multiple options.

Value and Default

  • The value attribute in an input element specifies the input's default value in an HTML form.
  • With method="get", The length of a URL is limited to 2048 characters.

Selection

  • The multiple attribute within a select input element allows users to select multiple options.
  • To create a number field we can add <input> element with the type attribute set to "number"
  • The HTML <input> element with the type attribute set to "number" in an HTML form will create a number input field.
  • The form attribute within an input element can be used to associate the input element with a specific form.
  • The novalidate attribute in an HTML form element is used to disable client-side form validation.

Forms and Structure

  • <fieldset> element in HTML forms group related data.
  • The legend tag is used to define the caption of <fieldset> data.
  • The HTML <bdo> tag is used to override the current text direction.
  • The HTML <cite> tag defines the title of a creative work.
  • The correct syntax for opening the form's result in a new browser tab is <form action='/action_page.php' target='_blank'>
  • <quote> is not a quotation element at all .
  • Value specifies the number of visible values in the select element.
  • User will see a drop-down list of the pre-defined options when using <option>.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

Description

Learn about HTML (Hyper Text Markup Language) and its fundamental components. Cover the basics of HTML, including tags, attributes, document structure, and syntax. Understand how to create hyperlinks and properly format HTML comments.

More Like This

HTML Tags and Attributes
25 questions

HTML Tags and Attributes

EfficientBlackHole avatar
EfficientBlackHole
HTML Tags and Attributes Quiz
20 questions

HTML Tags and Attributes Quiz

AffluentEpiphany1963 avatar
AffluentEpiphany1963
HTML Tags and Attributes Quiz
129 questions
HTML basics quiz
19 questions

HTML basics quiz

IndebtedOwl avatar
IndebtedOwl
Use Quizgecko on...
Browser
Browser