← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 171 · 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 heading shows the SMALLEST text: <h4>, <h2>, <h3> or <h5>? (a) <h3> (b) <h5> (c) <h4> (d) <h2>
  2. 2.Which of these is true of a web server? (a) answers page requests (b) turns HTML into a page (c) is where we type code (d) saves our .html files
  3. 3.True or false: <hr> is an empty tag. (a) True (b) False
  4. 4.📋 Does this list show bullets or numbers?
    <ul>
      <li>Mango</li>
      <li>Guava</li>
      <li>Litchi</li>
    </ul>
    (a) numbers (b) bullets
  5. 5.💬 Why do coders write comments? (a) to add colour (b) to show pictures (c) to make links (d) to leave notes
  6. 6.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h5> or <h3>? (a) <h6> (b) <h5> (c) <h1> (d) <h3>
  7. 7.📋 Which tag goes around each item of a list? (a) <ul> (b) <p> (c) <ol> (d) <li>
  8. 8.True or false: <ul> goes in the head. (a) False (b) True
  9. 9.Which of these is true of a code editor? (a) shows pages from the web (b) hosts websites online (c) opens web pages for us (d) saves our .html files
  10. 10.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
  11. 11.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a href="about.html"> (c) <a alt="about.html"> (d) <link about.html>
  12. 12.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <p>Fun facts</p>
    <!-- <p>Rain today</p> -->
    (a) Our school trip (b) Fun facts (c) Rain today
  13. 13.🔗 Which attribute holds the address of a link? (a) src (b) href (c) id (d) alt
  14. 14.🔢 In a basic web page file, which comes FIRST? (a) </body> (b) </head> (c) <!DOCTYPE html> (d) <html>
  15. 15.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  16. 16.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Grapes</li>
      <li>Mango</li>
    </ul>
    (a) numbers (b) bullets
  17. 17.📋 How many items does this list show?
    <ol>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Guava</li>
    </ol>
  18. 18.🔤 In “HTML”, what does the L stand for? (a) Link (b) Line (c) Laptop (d) Language
  19. 19.🔠 Are headings shown in bold by default? (a) Yes (b) No
  20. 20.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dot . (c) a dollar $ (d) a slash /
  21. 21.📄 Can HTML on its own make tables? (a) No (b) Yes
  22. 22.🔍 Which line is missing its closing tag?
    line 1: <small>Our school trip</small>
    line 2: <u>The red kite</u>
    line 3: <b>My best friend
    (a) line 3 (b) line 1 (c) line 2
  23. 23.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <h2>I love mangoes.</h2>
    <p>Our school trip</p>
    <h2>My pets</h2>
  24. 24.Which of these has a closing tag? (a) <p> (b) <meta> (c) <hr> (d) <input>
  25. 25.📋 What number does the browser show next to “Banana”?
    <ol>
      <li>Guava</li>
      <li>Banana</li>
      <li>Mango</li>
      <li>Orange</li>
    </ol>
  26. 26.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <p>My pets</p>
    <!-- <p>Good morning!</p> -->
  27. 27.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="50">
  28. 28.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  29. 29.🔍 Which line is missing its closing tag?
    line 1: <i>Cricket is fun.
    line 2: <u>I love mangoes.</u>
    line 3: <small>Good morning!</small>
    (a) line 2 (b) line 3 (c) line 1
  30. 30.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h2> or <h5>? (a) <h3> (b) <h6> (c) <h5> (d) <h2>
  31. 31.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <h2>Our school trip</h2>
    <p>The red kite</p>
  32. 32.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  33. 33.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 6 (c) 3 (d) 10
  34. 34.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <!-- <p>Rain today</p> -->
    <p>Fun facts</p>
    <p>My pets</p>
    (a) My pets (b) Fun facts (c) My best friend (d) Rain today
  35. 35.💬 Which text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>Our school trip</p>
    <p>Hello, world!</p>
    <p>Good morning!</p>
    (a) My pets (b) Our school trip (c) Good morning! (d) Hello, world!
  36. 36.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="350">
  37. 37.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Kites fly high<br>Birds sing<br>Rivers flow<br>Sky is blue</p>
  38. 38.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h6> or <h2>? (a) <h1> (b) <h4> (c) <h6> (d) <h2>
  39. 39.🔠 Which tag is the least important heading? (a) <h3> (b) <p> (c) <h6> (d) <h1>
  40. 40.True or false: <ol> shows bullet points. (a) False (b) True

Answer key

  1. <h5>
  2. answers page requests
  3. True
  4. bullets
  5. to leave notes
  6. <h1>
  7. <li>
  8. False
  9. saves our .html files
  10. in the body
  11. <a href="about.html">
  12. Rain today
  13. href
  14. <!DOCTYPE html>
  15. has a closing tag
  16. bullets
  17. 3
  18. Language
  19. Yes
  20. a slash /
  21. Yes
  22. line 3
  23. 2
  24. <p>
  25. 2
  26. 2
  27. 50
  28. Yes
  29. line 1
  30. <h6>
  31. 2
  32. No
  33. 1
  34. Rain today
  35. My pets
  36. 350
  37. 5
  38. <h1>
  39. <h6>
  40. False

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