← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 870 · 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.🔠 Which tag is the least important heading? (a) <h3> (b) <h6> (c) <h1> (d) <p>
  2. 2.🔍 Which line is missing its closing tag?
    line 1: <i>Cricket is fun.</i>
    line 2: <h2>I love mangoes.</h2>
    line 3: <b>Fun facts
    (a) line 3 (b) line 1 (c) line 2
  3. 3.🔢 In a basic web page file, which comes first: “<head>” or “</body>”? (a) <head> (b) </body>
  4. 4.🏷️ Is </p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  5. 5.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h3>I love mangoes.</h3>
    <h2>Good morning!</h2>
    <h4>My pets</h4>
  6. 6.🌐 Which one hosts websites online? (a) a web server (b) a code editor (c) a web browser
  7. 7.Which of these goes in the head? (a) <p> (b) <a> (c) <meta charset="utf-8"> (d) <ul>
  8. 8.🔗 Where does this link open?
    <a href="quiz.html" target="_blank">Maths fun</a>
    (a) in the same tab (b) in a new tab
  9. 9.Which of these is an opening tag? (a) </li> (b) <h1> (c) </p> (d) </title>
  10. 10.📋 Does this list show bullets or numbers?
    <ol>
      <li>Grapes</li>
      <li>Litchi</li>
      <li>Guava</li>
    </ol>
    (a) bullets (b) numbers
  11. 11.True or false: a web browser has an address bar. (a) False (b) True
  12. 12.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a src="about.html"> (c) <a href="about.html"> (d) <link about.html>
  13. 13.Which of these is an opening tag? (a) </title> (b) <b> (c) </body> (d) </h1>
  14. 14.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
  15. 15.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h3> or <h2>? (a) <h2> (b) <h6> (c) <h3> (d) <h5>
  16. 16.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
  17. 17.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Grapes</li>
      <li>Guava</li>
      <li>Banana</li>
      <li>Orange</li>
    </ul>
  18. 18.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
  19. 19.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>My pets</p>
    <!-- <p>Good morning!</p> -->
    <!-- <p>Our school trip</p> -->
  20. 20.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="400">
  21. 21.🔠 How many heading levels does HTML have? (a) 10 (b) 4 (c) 3 (d) 6
  22. 22.True or false: <link rel="stylesheet"> goes in the head. (a) False (b) True
  23. 23.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h3> or <h6>? (a) <h3> (b) <h5> (c) <h6> (d) <h4>
  24. 24.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  25. 25.📋 What number does the browser show next to “Papaya”?
    <ol>
      <li>Banana</li>
      <li>Mango</li>
      <li>Guava</li>
      <li>Orange</li>
      <li>Papaya</li>
      <li>Grapes</li>
    </ol>
  26. 26.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  27. 27.📝 What does <hr> draw? (a) a picture (b) a table (c) a link (d) a line across the page
  28. 28.🏷️ Which is the closing tag for <h2>? (a) <h2/> (b) </h2> (c) <\h2> (d) <h2>
  29. 29.True or false: a web browser is where we type code. (a) True (b) False
  30. 30.💬 How does an HTML comment start? (a) /* (b) // (c) # (d) <!--
  31. 31.🔍 Which is the odd one out? (a) opens web pages for us (b) shows pages from the web (c) stores a website’s files (d) has an address bar
  32. 32.True or false: <br> is an empty tag. (a) False (b) True
  33. 33.Which of these goes in the head? (a) <img> (b) <h1> (c) <title> (d) <p>
  34. 34.🖼️ Which attribute of <img> describes the picture? (a) height (b) alt (c) src (d) width
  35. 35.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h2>I love mangoes.</h2>
    <p>Cricket is fun.</p>
    <p>My pets</p>
    <p>My best friend</p>
  36. 36.🔢 In a basic web page file, which comes LAST? (a) </body> (b) </html> (c) </head> (d) <body>
  37. 37.📄 Which part holds everything you see on the page? (a) the body (b) the title (c) the doctype (d) the head
  38. 38.📋 Which list tag lists things in any order? (a) <ul> (b) <ol> (c) <li>
  39. 39.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="400">
    (a) A red kite (b) map.png (c) cake.jpg (d) kite.png
  40. 40.🔗 Where does this link open?
    <a href="contact.html">Take the quiz</a>
    (a) in the same tab (b) in a new tab

Answer key

  1. <h6>
  2. line 3
  3. <head>
  4. a closing tag
  5. 4
  6. a web server
  7. <meta charset="utf-8">
  8. in a new tab
  9. <h1>
  10. numbers
  11. True
  12. <a href="about.html">
  13. <b>
  14. in the body
  15. <h2>
  16. in the body
  17. 5
  18. No
  19. 1
  20. 400
  21. 6
  22. True
  23. <h3>
  24. Yes
  25. 5
  26. Yes
  27. a line across the page
  28. </h2>
  29. False
  30. <!--
  31. stores a website’s files
  32. True
  33. <title>
  34. alt
  35. 2
  36. </html>
  37. the body
  38. <ul>
  39. kite.png
  40. in the same tab

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