← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 59 · 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: <i>Hello, world!</i>
    line 2: <h3>Cricket is fun.
    line 3: <p>Our school trip</p>
    (a) line 3 (b) line 2 (c) line 1
  2. 2.True or false: in <img>, width is read by screen readers. (a) True (b) False
  3. 3.🔍 One closing tag is missing. Which one?
    <u>My pets</u>
    <i>I love mangoes.
    <small>Rain today</small>
    (a) </u> (b) </p> (c) </i> (d) </small>
  4. 4.💬 Which text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>Hello, world!</p>
    <p>Good morning!</p>
    (a) Hello, world! (b) My pets (c) Good morning!
  5. 5.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <p>Hello, world!</p>
    <h2>Hello, world!</h2>
    <p>The red kite</p>
    <p>I love mangoes.</p>
  6. 6.True or false: <ol> shows 1, 2, 3 numbers. (a) True (b) False
  7. 7.Which of these is an opening tag? (a) </li> (b) </h1> (c) <li> (d) </p>
  8. 8.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h6> or <h1>? (a) <h3> (b) <h1> (c) <h2> (d) <h6>
  9. 9.🔗 Which words do you click on?
    <a href="https://example.com">About us</a>
    (a) Contact us (b) href (c) About us (d) https://example.com
  10. 10.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h5> or <h4>? (a) <h3> (b) <h2> (c) <h4> (d) <h5>
  11. 11.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) </head> (c) <body> (d) <html>
  12. 12.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 6 (c) 1 (d) 10
  13. 13.🏷️ Which is the closing tag for <strong>? (a) <\strong> (b) <strong/> (c) <strong> (d) </strong>
  14. 14.📝 What does <hr> draw? (a) a picture (b) a table (c) a line across the page (d) a link
  15. 15.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  16. 16.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  17. 17.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="50">
  18. 18.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a src="about.html"> (c) <link about.html> (d) <a alt="about.html">
  19. 19.🔗 Which words do you click on?
    <a href="news.html">Play games</a>
    (a) Play games (b) news.html (c) About us (d) href
  20. 20.Which of these is an empty tag? (a) <h1> (b) <li> (c) <br> (d) <title>
  21. 21.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="300">
    (a) cake.jpg (b) dog.jpg (c) Birthday cake (d) moon.png
  22. 22.🔍 One closing tag is missing. Which one?
    <strong>I love mangoes.
    <h3>My pets</h3>
    <i>The red kite</i>
    (a) </i> (b) </h3> (c) </h2> (d) </strong>
  23. 23.📋 Which tag goes around each item of a list? (a) <p> (b) <li> (c) <ul> (d) <ol>
  24. 24.Which of these is true of a web browser? (a) saves our .html files (b) turns HTML into a page (c) hosts websites online (d) is where we type code
  25. 25.🔗 Where does this link open?
    <a href="https://example.com">Visit the site</a>
    (a) in the same tab (b) in a new tab
  26. 26.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h2> or <h1>? (a) <h6> (b) <h2> (c) <h1> (d) <h5>
  27. 27.🔗 Which words do you click on?
    <a href="contact.html">Play games</a>
    (a) contact.html (b) href (c) About us (d) Play games
  28. 28.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Birds sing</p>
  29. 29.🔗 Which words do you click on?
    <a href="quiz.html">About us</a>
    (a) quiz.html (b) href (c) About us (d) Contact us
  30. 30.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Rivers flow<br>Roses are red<br>Sky is blue</p>
  31. 31.True or false: <ol> lists steps in order. (a) True (b) False
  32. 32.True or false: <br> has a closing tag. (a) True (b) False
  33. 33.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="50">
  34. 34.True or false: a code editor shows pages from the web. (a) False (b) True
  35. 35.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>My best friend</p>
    <!-- <p>Hello, world!</p> -->
    (a) Hello, world! (b) My pets (c) My best friend
  36. 36.True or false: in <img>, height sets how wide it is. (a) True (b) False
  37. 37.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) My Hobbies (b) body (c) Welcome! (d) We won by 5 runs.
  38. 38.True or false: in <img>, height sets how tall it is. (a) True (b) False
  39. 39.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h3> or <h1>? (a) <h3> (b) <h1> (c) <h5> (d) <h4>
  40. 40.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h2> or <h1>? (a) <h6> (b) <h3> (c) <h1> (d) <h2>

Answer key

  1. line 2
  2. False
  3. </i>
  4. My pets
  5. 4
  6. True
  7. <li>
  8. <h1>
  9. About us
  10. <h2>
  11. <!DOCTYPE html>
  12. 1
  13. </strong>
  14. a line across the page
  15. an opening tag
  16. in the head
  17. 50
  18. <a href="about.html">
  19. Play games
  20. <br>
  21. cake.jpg
  22. </strong>
  23. <li>
  24. turns HTML into a page
  25. in the same tab
  26. <h1>
  27. Play games
  28. 2
  29. About us
  30. 4
  31. True
  32. False
  33. 50
  34. False
  35. Hello, world!
  36. False
  37. Welcome!
  38. True
  39. <h1>
  40. <h1>

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