← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 219 · 40 questions
TalentJR

Code tip (Read the code like a browser): Find the topic of the question: tags, headings, lists, links, images, structure or comments. Read the code line by line, the way a browser would. Count carefully: tags opened and closed, items, lines, paragraphs.

NameDateTime takenScore ___ / 40
  1. 1.True or false: <ul> goes in the body. (a) True (b) False
  2. 2.📋 How many items does this list show?
    <ul>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Banana</li>
      <li>Grapes</li>
      <li>Guava</li>
      <li>Jamun</li>
    </ul>
  3. 3.🔠 Which tag is the least important heading? (a) <h1> (b) <p> (c) <h6> (d) <h3>
  4. 4.True or false: in <img>, src describes the picture. (a) True (b) False
  5. 5.🔗 Which attribute holds the address of a link? (a) src (b) href (c) id (d) alt
  6. 6.🔗 Which tag makes a clickable link? (a) <link> (b) <a> (c) <p> (d) <img>
  7. 7.Which of these is an empty tag? (a) <meta> (b) <h1> (c) <li> (d) <b>
  8. 8.📝 What does <hr> draw? (a) a line across the page (b) a link (c) a picture (d) a table
  9. 9.📄 Which part holds everything you see on the page? (a) the title (b) the body (c) the head (d) the doctype
  10. 10.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
  11. 11.🔢 In a basic web page file, which comes first: “</head>” or “</body>”? (a) </body> (b) </head>
  12. 12.📋 What number does the browser show next to “Orange”?
    <ol>
      <li>Jamun</li>
      <li>Orange</li>
      <li>Litchi</li>
      <li>Guava</li>
    </ol>
  13. 13.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) hides the link (c) makes it bold (d) makes it blank
  14. 14.💬 Does the browser show comments on the page? (a) No (b) Yes
  15. 15.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h3> or <h6>? (a) <h6> (b) <h5> (c) <h1> (d) <h3>
  16. 16.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  17. 17.📄 Can HTML on its own keep a high score? (a) Yes (b) No
  18. 18.🔗 Where does this link open?
    <a href="games.html">About us</a>
    (a) in the same tab (b) in a new tab
  19. 19.💬 How does an HTML comment end? (a) */ (b) // (c) >> (d) -->
  20. 20.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
    <p>I love mangoes.</p>
  21. 21.True or false: in <img>, width sets how wide it is. (a) True (b) False
  22. 22.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Roses are red<br>Rivers flow</p>
  23. 23.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as one space (c) as a new line (d) as a dot
  24. 24.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  25. 25.Which of these is an empty tag? (a) <ul> (b) <input> (c) <li> (d) <title>
  26. 26.🔗 Which words do you click on?
    <a href="quiz.html">Take the quiz</a>
    (a) Take the quiz (b) quiz.html (c) Play games (d) href
  27. 27.📛 In <a href="x.html">, what is href? (a) a comment (b) a closing tag (c) an attribute (d) an element name
  28. 28.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <p>Rain today</p>
    <!-- <p>My pets</p> -->
  29. 29.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h5> or <h6>? (a) <h1> (b) <h4> (c) <h5> (d) <h6>
  30. 30.📋 Does this list show bullets or numbers?
    <ol>
      <li>Papaya</li>
      <li>Grapes</li>
    </ol>
    (a) numbers (b) bullets
  31. 31.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) alt (c) width (d) height
  32. 32.🔍 Which is the odd one out? (a) has an address bar (b) hosts websites online (c) stores a website’s files (d) answers page requests
  33. 33.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <ul> (c) <hr> (d) <br>
  34. 34.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <!-- <p>Rain today</p> -->
    <p>I love mangoes.</p>
    <p>The red kite</p>
    (a) Rain today (b) The red kite (c) Our school trip (d) I love mangoes.
  35. 35.💬 Which text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>The red kite</p>
    <p>Fun facts</p>
    <p>Our school trip</p>
    (a) The red kite (b) Fun facts (c) Our school trip (d) My pets
  36. 36.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Here is my best one. (b) Easy snacks (c) index.html (d) Class 7 Blog
  37. 37.💬 Why do coders write comments? (a) to show pictures (b) to make links (c) to add colour (d) to leave notes
  38. 38.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Planets (b) Mars is red. (c) index.html (d) Class 7 Blog
  39. 39.📋 Does this list show bullets or numbers?
    <ul>
      <li>Guava</li>
      <li>Papaya</li>
      <li>Litchi</li>
    </ul>
    (a) numbers (b) bullets
  40. 40.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag

Answer key

  1. True
  2. 6
  3. <h6>
  4. False
  5. href
  6. <a>
  7. <meta>
  8. a line across the page
  9. the body
  10. 3
  11. </head>
  12. 2
  13. opens it in a new tab
  14. No
  15. <h6>
  16. an empty tag
  17. No
  18. in the same tab
  19. -->
  20. 4
  21. True
  22. 3
  23. as one space
  24. Yes
  25. <input>
  26. Take the quiz
  27. an attribute
  28. 2
  29. <h1>
  30. numbers
  31. alt
  32. has an address bar
  33. <ol>
  34. Rain today
  35. My pets
  36. Class 7 Blog
  37. to leave notes
  38. Class 7 Blog
  39. bullets
  40. an opening tag

Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids