← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 522 · 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.💬 Does the browser show comments on the page? (a) Yes (b) No
  2. 2.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <style> (c) <title> (d) <img>
  3. 3.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Birds sing<br>Roses are red<br>Kites fly high<br>Stars shine</p>
  4. 4.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  5. 5.True or false: in <img>, alt sets how wide it is. (a) True (b) False
  6. 6.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  7. 7.💬 Which text will NOT show on the page?
    <!-- <p>My best friend</p> -->
    <p>Our school trip</p>
    <p>My pets</p>
    <p>Hello, world!</p>
    (a) Our school trip (b) My pets (c) Hello, world! (d) My best friend
  8. 8.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <h1> (c) <p> (d) <br>
  9. 9.💬 How does an HTML comment start? (a) /* (b) # (c) // (d) <!--
  10. 10.📋 Which list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <ul> (d) <br>
  11. 11.🏷️ Which is the closing tag for <u>? (a) <\u> (b) <u/> (c) </u> (d) <u>
  12. 12.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="350">
  13. 13.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Welcome! (b) Here is my best one. (c) Space Facts (d) index.html
  14. 14.🔗 Which words do you click on?
    <a href="art.html">Play games</a>
    (a) href (b) About us (c) art.html (d) Play games
  15. 15.🖼️ Which attribute of <img> tells which image to load? (a) src (b) alt (c) height (d) width
  16. 16.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) opens it in a new tab (d) makes it bold
  17. 17.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 3 (d) 4
  18. 18.Which of these goes in the head? (a) <ul> (b) <img> (c) <p> (d) <link rel="stylesheet">
  19. 19.True or false: <p> has a closing tag. (a) False (b) True
  20. 20.🔢 In a basic web page file, which comes first: “</head>” or “<!DOCTYPE html>”? (a) <!DOCTYPE html> (b) </head>
  21. 21.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) height (c) src (d) width
  22. 22.🔍 Which line is missing its closing tag?
    line 1: <h3>Cricket is fun.</h3>
    line 2: <strong>The red kite</strong>
    line 3: <p>Our school trip
    (a) line 1 (b) line 3 (c) line 2
  23. 23.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Fun facts</p>
    <p>Cricket is fun.</p>
    (a) Fun facts (b) Hello, world! (c) Cricket is fun.
  24. 24.🔗 Which address opens when you click this link?
    <a href="news.html">Play games</a>
    (a) Play games (b) games.html (c) news.html (d) quiz.html
  25. 25.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>Good morning!</p>
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
    <p>Rain today</p>
  26. 26.🔢 In a basic web page file, which comes first: “</html>” or “<!DOCTYPE html>”? (a) <!DOCTYPE html> (b) </html>
  27. 27.📋 Does this list show bullets or numbers?
    <ol>
      <li>Litchi</li>
      <li>Grapes</li>
      <li>Papaya</li>
    </ol>
    (a) numbers (b) bullets
  28. 28.🔍 One closing tag is missing. Which one?
    <u>The red kite</u>
    <h2>My pets
    <small>Good morning!</small>
    (a) </h2> (b) </small> (c) </u> (d) </strong>
  29. 29.📋 How many items does this list show?
    <ul>
      <li>Papaya</li>
      <li>Banana</li>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Litchi</li>
    </ul>
  30. 30.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <p>I love mangoes.</p>
    <!-- <p>Cricket is fun.</p> -->
    (a) My best friend (b) I love mangoes. (c) Cricket is fun.
  31. 31.🔍 Which is the odd one out? (a) saves our .html files (b) shows line numbers (c) shows pages from the web (d) colours code to help us
  32. 32.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h2> or <h4>? (a) <h3> (b) <h2> (c) <h1> (d) <h4>
  33. 33.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <ol> (c) <br> (d) <hr>
  34. 34.True or false: <li> shows bullet points. (a) False (b) True
  35. 35.🔗 Which words do you click on?
    <a href="https://example.com">Play games</a>
    (a) https://example.com (b) Play games (c) About us (d) href
  36. 36.Which of these goes in the head? (a) <title> (b) <h1> (c) <a> (d) <p>
  37. 37.🔗 Which words do you click on?
    <a href="contact.html">Maths fun</a>
    (a) href (b) Maths fun (c) Art corner (d) contact.html
  38. 38.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <p>Fun facts</p>
    <p>Hello, world!</p>
    <p>Hello, world!</p>
    <p>Hello, world!</p>
  39. 39.Which of these goes in the head? (a) <p> (b) <ul> (c) <meta charset="utf-8"> (d) <table>
  40. 40.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head

Answer key

  1. No
  2. <img>
  3. 5
  4. Yes
  5. False
  6. a closing tag
  7. My best friend
  8. <h1>
  9. <!--
  10. <ul>
  11. </u>
  12. 350
  13. Space Facts
  14. Play games
  15. src
  16. opens it in a new tab
  17. 6
  18. <link rel="stylesheet">
  19. True
  20. <!DOCTYPE html>
  21. alt
  22. line 3
  23. Hello, world!
  24. news.html
  25. 4
  26. <!DOCTYPE html>
  27. numbers
  28. </h2>
  29. 5
  30. Cricket is fun.
  31. shows pages from the web
  32. <h1>
  33. <ol>
  34. False
  35. Play games
  36. <title>
  37. Maths fun
  38. 1
  39. <meta charset="utf-8">
  40. in the body

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