Skip to content

HTML Quiz

Shaswat Raj edited this page Jul 22, 2024 · 1 revision

HTML in One Video Quiz

Introduction

Question 1

What does HTML stand for?

  • Hypertext Markup Language
  • Home Tool Markup Language
  • Hyperlinks and Text Markup Language
  • Hyperlink Markup Language
Answer 1

Question 2

Which of the following is the correct basic structure of an HTML document?

  • <!DOCTYPE html> <html> <head> <title></title> <body> </body> </head> </html>
  • <!DOCTYPE html> <html> <head> <title></title> </head> <body> </body> </html>
  • <html> <head> <title></title> </head> <body> </body> </html> </DOCTYPE html>
  • <html> <head> <title></title> <body> </body> </head> </html>
Answer 2

Development

Question 3

Which tag is used for the largest heading?

  • <h1>
  • <heading>
  • <h6>
  • <head>
Answer 1

Question 4

How do you create a hyperlink in HTML?

  • <a href="http://www.example.com">Example</a>
  • <link url="http://www.example.com">Example</link>
  • <a url="http://www.example.com">Example</a>
  • <hyperlink src="http://www.example.com">Example</hyperlink>
Answer 1

Question 5

Which tag is used to display an image in HTML?

  • <img src="image.jpg" alt="description">
  • <image src="image.jpg" alt="description">
  • <picture src="image.jpg" alt="description">
  • <src img="image.jpg" alt="description">
Answer 1

Question 6

What is the correct HTML element for creating an unordered list?

  • <ul>
  • <ol>
  • <li>
  • <list>
Answer 1

Question 7

How do you merge two table cells horizontally?

  • colspan
  • rowspan
  • merge
  • cellspan
Answer 1

Question 8

Which attribute is used to define the URL where the form data will be sent?

  • action
  • method
  • url
  • href
Answer 1

Question 9

Which HTML element is used to define important text?

  • <strong>
  • <important>
  • <i>
  • <b>
Answer 1

Question 10

What is the purpose of the <header> element in HTML5?

  • It defines a header for a document or section.
  • It defines the topmost part of a webpage.
  • It defines the heading of a table.
  • It defines the header of an image.
Answer 1

Question 11

Which tag is used to embed a video in HTML?

  • <video>
  • <media>
  • <movie>
  • <embed>
Answer 1

Question 12

What is the file extension for an HTML file?

  • .html
  • .htm
  • .css
  • .web
Answer 1

Question 13

Which of these platforms offer free hosting for HTML sites?

  • GitHub Pages
  • Netlify
  • Heroku
  • All of the above
Answer 4

Question 14

Which HTML element is used for specifying metadata?

  • <meta>
  • <metadata>
  • <data>
  • <info>
Answer 1

Question 15

Which of the following is a reliable resource for learning HTML?

  • MDN Web Docs
  • W3Schools
  • Codecademy
  • All of the above
Answer 4

Question 16

What does the <body> tag in HTML do?

  • Contains the visible content of the webpage
  • Contains meta information
  • Defines the document type
  • Links external resources
Answer 1

Question 17

How do you create a comment in HTML?

  • <!-- This is a comment -->
  • // This is a comment
  • /* This is a comment */
  • # This is a comment
Answer 1

Question 18

Which element is used to create a numbered list?

  • <ol>
  • <ul>
  • <li>
  • <list>
Answer 1

Question 19

What attribute is used to provide alternative text for an image?

  • alt
  • title
  • src
  • href
Answer 1

Question 20

Which element is used to create a dropdown list in a form?

  • <select>
  • <option>
  • <input>
  • <dropdown>
Answer 1

Question 21

What does the <nav> element represent in HTML5?

  • A section of navigation links
  • The main content area
  • The footer of a document
  • An image gallery
Answer 1

Question 22

Which attribute specifies that an input field must be filled out before submitting a form?

  • required
  • validate
  • mandatory
  • mustfill
Answer 1

Question 23

What is the purpose of the <footer> element in HTML5?

  • It defines a footer for a document or section.
  • It creates a fixed footer at the bottom of the page.
  • It styles the footer text.
  • It includes the closing tags for a document.
Answer 1

Question 24

Which HTML tag is used to define an internal style sheet?

  • <style>
  • <css>
  • <stylesheet>
  • <link>
Answer 1

Question 25

How do you create a table in HTML?

  • <table>
  • <tbl>
  • <tr>
  • <td>
Answer 1

Question 26

What does the target="_blank" attribute do when added to a hyperlink?

  • Opens the link in a new tab or window
  • Opens the link in the same tab
  • Creates a blank hyperlink
  • Removes the hyperlink
Answer 1

Question 27

Which tag is used to define an interactive field in an HTML form?

  • <input>
  • <field>
  • <interactive>
  • <enter>
Answer 1

Question 28

What is the purpose of the <section> element in HTML5?

  • It defines a section in a document.
  • It creates a sidebar.
  • It specifies a section of a table.
  • It styles the text in a section.
Answer 1

Question 29

How do you add a background color to an HTML element?

  • Using the style attribute
  • Using the color attribute
  • Using the bgcolor attribute
  • Using the background attribute
Answer 1

Question 30

Which element is used to create a horizontal line in HTML?

  • <hr>
  • <line>
  • <horizontal>
  • <break>
Answer 1

Question 31

Which attribute is used to uniquely identify an HTML element?

  • id
  • class
  • name
  • identity
Answer 1

Question 32

How do you specify the character encoding for an HTML document?

  • <meta charset="UTF-8">
  • <meta encoding="UTF-8">
  • <meta type="UTF-8">
  • <meta content="UTF-8">
Answer 1

Question 33

Which HTML element is used to create a text area?

  • <textarea>
  • <input type="textarea">
  • <textbox>
  • <input type="textbox">
Answer 1

Question 34

What does the alt attribute provide for an image?

  • Alternative text for accessibility
  • The title of the image
  • The source URL of the image
  • The size of the image
Answer 1

Question 35

Which element is used to group block-elements to format them with CSS?

  • <div>
  • <span>
  • <group>
  • <block>
Answer 1

Question 36

Which HTML element is used to group inline elements?

  • <span>
  • <div>
  • <group>
  • <inline>
Answer 1

Question 37

What is the purpose of the <aside> element in HTML5?

  • It defines content aside from the main content.
  • It defines a sidebar.
  • It specifies a section of a table.
  • It styles the text in a section.
Answer 1

Question 38

Which attribute is used to specify that an input field is read-only?

  • readonly
  • disabled
  • readonly="true"
  • locked
Answer 1

Question 39

Which HTML element is used to create a drop-down list?

  • <select>
  • <dropdown>
  • <list>
  • <options>
Answer 1

Question 40

What does the rel="stylesheet" attribute specify when used in a <link> element?

  • It specifies the relationship between the current document and the linked document.
  • It specifies the relative path to the linked document.
  • It specifies the release date of the linked document.
  • It specifies the rendering behavior of the linked document.
Answer 1

Question 41

Which HTML element is used for specifying a table header?

  • <th>
  • <thead>
  • <header>
  • <tr>
Answer 1

Question 42

What does the <caption> element do in a table?

  • It adds a title or caption to the table.
  • It creates a heading row.
  • It adds a summary to the table.
  • It creates a footer row.
Answer 1

Question 43

How do you specify the width and height of an image?

  • Using the width and height attributes
  • Using the size attribute
  • Using the dimension attribute
  • Using the img-size attribute
Answer 1

Question 44

Which element is used to define emphasized text?

  • <em>
  • <i>
  • <strong>
  • <b>
Answer 1

Question 45

What does the <code> element represent?

  • A piece of computer code
  • The language of the document
  • A special character
  • The copyright information
Answer 1

Question 46

Which element is used to create a horizontal line?

  • <hr>
  • <line>
  • <break>
  • <separator>
Answer 1

Question 47

How do you make text bold in HTML?

  • <b>
  • <bold>
  • <strong>
  • <em>
Answer 1 or 3

Question 48

Which element is used to create a clickable button?

  • <button>
  • <input type="button">
  • Both <button> and <input type="button">
  • <click>
Answer 3

Question 49

What does the <cite> element represent?

  • A reference to a creative work
  • A blockquote
  • A citation number
  • A site URL
Answer 1

Question 50

Which attribute specifies the number of rows a cell should span in a table?

  • rowspan
  • colspan
  • cellspan
  • rows
Answer 1