← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 203 · 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 line is missing its closing tag?
    line 1: <b>The red kite
    line 2: <u>Rain today</u>
    line 3: <p>Hello, world!</p>
    (a) line 2 (b) line 1 (c) line 3
  2. 2.🔗 Which words do you click on?
    <a href="maths.html">Visit the site</a>
    (a) Maths fun (b) Visit the site (c) href (d) maths.html
  3. 3.📋 Which list tag lists steps in order? (a) <ol> (b) <li> (c) <ul>
  4. 4.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) All about me (b) Cricket Club (c) index.html (d) Thanks for visiting.
  5. 5.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>I love mangoes.</p>
    <p>My pets</p>
    <p>Fun facts</p>
    <h2>Good morning!</h2>
  6. 6.🔢 In a basic web page file, which comes FIRST? (a) </body> (b) </head> (c) <html> (d) <!DOCTYPE html>
  7. 7.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  8. 8.True or false: <link rel="stylesheet"> goes in the body. (a) False (b) True
  9. 9.🔤 In “HTML”, what does the M stand for? (a) Machine (b) Markup (c) Mouse (d) Modern
  10. 10.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <head> (d) <html>
  11. 11.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <p>My pets</p>
    <h2>I love mangoes.</h2>
    <h2>Good morning!</h2>
  12. 12.💬 How does an HTML comment start? (a) <!-- (b) # (c) /* (d) //
  13. 13.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  14. 14.🔗 Which words do you click on?
    <a href="contact.html">Visit the site</a>
    (a) Visit the site (b) href (c) contact.html (d) Maths fun
  15. 15.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="350">
    (a) dog.jpg (b) bus.jpg (c) moon.png (d) A happy dog
  16. 16.🔍 One closing tag is missing. Which one?
    <h3>My pets</h3>
    <h1>Cricket is fun.</h1>
    <p>Our school trip
    (a) </em> (b) </h3> (c) </p> (d) </h1>
  17. 17.📋 Which list tag goes inside ul or ol? (a) <ol> (b) <ul> (c) <li>
  18. 18.🖼️ Which tag puts a picture on a page? (a) <p> (b) <a> (c) <pic> (d) <img>
  19. 19.💬 How does an HTML comment end? (a) --> (b) >> (c) */ (d) //
  20. 20.Which of these is an opening tag? (a) </p> (b) </title> (c) </h1> (d) <h1>
  21. 21.🔗 Which words do you click on?
    <a href="contact.html">Maths fun</a>
    (a) contact.html (b) Maths fun (c) Art corner (d) href
  22. 22.True or false: <a> goes in the body. (a) True (b) False
  23. 23.🔗 Which words do you click on?
    <a href="maths.html">Play games</a>
    (a) About us (b) maths.html (c) Play games (d) href
  24. 24.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <h2>Fun facts</h2>
    <p>Fun facts</p>
    <p>Our school trip</p>
    <p>The red kite</p>
    <p>Cricket is fun.</p>
  25. 25.🔠 Which tag is the least important heading? (a) <p> (b) <h6> (c) <h1> (d) <h3>
  26. 26.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <p>Good morning!</p>
    <!-- <p>My pets</p> -->
  27. 27.💬 Which text will NOT show on the page?
    <!-- <p>Good morning!</p> -->
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
    <p>My pets</p>
    (a) My pets (b) Good morning! (c) Our school trip (d) Cricket is fun.
  28. 28.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to leave notes (d) to show pictures
  29. 29.📄 Which part holds everything you see on the page? (a) the title (b) the head (c) the doctype (d) the body
  30. 30.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  31. 31.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <!-- <p>The red kite</p> -->
    <p>Cricket is fun.</p>
  32. 32.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h3> or <h4>? (a) <h3> (b) <h2> (c) <h6> (d) <h4>
  33. 33.🔍 One closing tag is missing. Which one?
    <h1>I love mangoes.</h1>
    <p>Our school trip</p>
    <h3>The red kite
    (a) </h3> (b) </h1> (c) </small> (d) </p>
  34. 34.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="50">
    (a) bus.jpg (b) moon.png (c) The full moon (d) fort.jpg
  35. 35.True or false: <title> goes in the head. (a) True (b) False
  36. 36.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <hr> (d) <ul>
  37. 37.📋 Does this list show bullets or numbers?
    <ul>
      <li>Orange</li>
      <li>Litchi</li>
    </ul>
    (a) numbers (b) bullets
  38. 38.🔗 Which address opens when you click this link?
    <a href="quiz.html">School news</a>
    (a) quiz.html (b) games.html (c) School news (d) about.html
  39. 39.True or false: in <img>, height sets how wide it is. (a) True (b) False
  40. 40.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="350">

Answer key

  1. line 1
  2. Visit the site
  3. <ol>
  4. Cricket Club
  5. 4
  6. <!DOCTYPE html>
  7. in the head
  8. False
  9. Markup
  10. <!DOCTYPE html>
  11. 2
  12. <!--
  13. Yes
  14. Visit the site
  15. dog.jpg
  16. </p>
  17. <li>
  18. <img>
  19. -->
  20. <h1>
  21. Maths fun
  22. True
  23. Play games
  24. 5
  25. <h6>
  26. 2
  27. Good morning!
  28. to leave notes
  29. the body
  30. a closing tag
  31. 1
  32. <h6>
  33. </h3>
  34. moon.png
  35. True
  36. <ol>
  37. bullets
  38. quiz.html
  39. False
  40. 350

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