-
Which HTML tag is used to define a navigation menu within a webpage?
- A) <nav>
- B) <menu>
- C) <navigation>
- D) <navbar>
Answer: A) <nav>
Explanation: The <nav> tag is specifically used to define a navigation menu within an HTML document.
-
What is the correct HTML tag for creating a button?
- A) <button>
- B) <btn>
- C) <input type="button">
- D) <btn-input>
Answer: A) <button>
Explanation: The <button> tag is used to create a clickable button in HTML.
-
Which HTML attribute is used to specify alternative text for an image?
- A) alt
- B) title
- C) src
- D) href
Answer: A) alt
Explanation: The "alt" attribute is used to provide alternative text for an image, which is displayed if the image cannot be loaded or for accessibility purposes.
-
What is the correct HTML tag for defining the header of a table?
- A) <table-header>
- B) <thead>
- C) <header>
- D) <th>
Answer: B) <thead>
Explanation: The <thead> tag is used to define the header section of a table, containing the table's heading rows.
-
Which HTML tag is used to define a section of quoted text?
- A) <quote>
- B) <blockquote>
- C) <cite>
- D) <q>
Answer: B) <blockquote>
Explanation: The <blockquote> tag is used to define a section of quoted text in HTML.
-
What is the correct HTML tag for defining the footer of a webpage or section?
- A) <footer>
- B) <bottom>
- C) <end>
- D) <foot>
Answer: A) <footer>
Explanation: The <footer> tag is used to define the footer section of a webpage or section, typically containing information such as copyright notices or contact information.
-
Which HTML tag is used to create a dropdown menu?
- A) <menu>
- B) <dropdown>
- C) <select>
- D) <option>
Answer: C) <select>
Explanation: The <select> tag is used to create a dropdown menu in HTML, with selectable options defined by nested <option> tags.
-
What is the correct HTML tag for defining the main content area of a webpage?
- A) <content>
- B) <main>
- C) <body>
- D) <section>
Answer: B) <main>
Explanation: The <main> tag is used to define the main content area of a webpage, containing the primary content of the page.
-
Which HTML tag is used to create a hyperlink to an email address?
- A) <link>
- B) <mailto>
- C) <email>
- D) <a>
Answer: D) <a>
Explanation: The <a> tag, along with the "mailto" attribute, is used to create a hyperlink to an email address in HTML.
-
What is the correct HTML tag for adding a line of code or computer output within a paragraph?
- A) <code>
- B) <pre>
- C) <output>
- D) <samp>
Answer: A) <code>
Explanation: The <code> tag is used to define a piece of computer code or computer output within a paragraph of text.
Comments