← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 123 · 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 of these is true of a web browser? (a) is where we type code (b) colours code to help us (c) turns HTML into a page (d) shows line numbers
  2. 2.📋 How many items does this list show?
    <ol>
      <li>Guava</li>
      <li>Orange</li>
    </ol>
  3. 3.🏷️ Which is the closing tag for <p>? (a) </p> (b) <p> (c) <\p> (d) <p/>
  4. 4.True or false: <img> goes in the body. (a) True (b) False
  5. 5.True or false: a web server shows pages from the web. (a) False (b) True
  6. 6.True or false: <ol> is an ordered list. (a) True (b) False
  7. 7.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h2>My pets</h2>
    <p>Fun facts</p>
  8. 8.🔍 Which line is missing its closing tag?
    line 1: <h2>Hello, world!
    line 2: <small>Fun facts</small>
    line 3: <h1>Rain today</h1>
    (a) line 1 (b) line 2 (c) line 3
  9. 9.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>My pets</p>
    <!-- <p>My best friend</p> -->
    <!-- <p>I love mangoes.</p> -->
  10. 10.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h5> or <h6>? (a) <h5> (b) <h2> (c) <h3> (d) <h6>
  11. 11.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <a> (d) <link>
  12. 12.True or false: in <img>, height tells which image to load. (a) True (b) False
  13. 13.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <p>Fun facts</p>
    <p>I love mangoes.</p>
    <!-- <p>Hello, world!</p> -->
    (a) I love mangoes. (b) My best friend (c) Fun facts (d) Hello, world!
  14. 14.🔍 Which line is missing its closing tag?
    line 1: <u>Rain today
    line 2: <strong>Good morning!</strong>
    line 3: <i>I love mangoes.</i>
    (a) line 1 (b) line 3 (c) line 2
  15. 15.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h2> or <h6>? (a) <h1> (b) <h6> (c) <h5> (d) <h2>
  16. 16.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="100">
    (a) tiger.jpg (b) width (c) A red kite (d) A tiger asleep
  17. 17.📋 Which list suits a shopping list in any order? (a) <ol> (b) <ul> (c) <br> (d) <hr>
  18. 18.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
    <!-- <p>I love mangoes.</p> -->
  19. 19.Which of these is a closing tag? (a) <title> (b) <b> (c) <h1> (d) </title>
  20. 20.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="150">
    (a) bus.jpg (b) moon.png (c) A happy dog (d) dog.jpg
  21. 21.Which of these is a closing tag? (a) <p> (b) <b> (c) <body> (d) </li>
  22. 22.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  23. 23.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to describe the image (c) to make it bigger (d) to colour it
  24. 24.🏷️ Which is the closing tag for <i>? (a) <\i> (b) <i/> (c) </i> (d) <i>
  25. 25.True or false: <ul> is an unordered list. (a) True (b) False
  26. 26.True or false: HTML on its own cannot make bullet lists. (a) False (b) True
  27. 27.🔢 In a basic web page file, which comes LAST? (a) </body> (b) </html> (c) <!DOCTYPE html> (d) </head>
  28. 28.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>The red kite</p>
    <p>Rain today</p>
    <p>Rain today</p>
  29. 29.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
  30. 30.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h3> or <h6>? (a) <h2> (b) <h3> (c) <h5> (d) <h6>
  31. 31.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    <!-- <p>Our school trip</p> -->
    <!-- <p>Fun facts</p> -->
  32. 32.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
  33. 33.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <!-- <p>Hello, world!</p> -->
    <!-- <p>Good morning!</p> -->
    <p>The red kite</p>
    <!-- <p>My pets</p> -->
  34. 34.📝 What does <br> do? (a) makes a list (b) starts a new line (c) adds a picture (d) makes text bold
  35. 35.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to add colour (d) to make links
  36. 36.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Stars shine<br>Sky is blue<br>Birds sing<br>Kites fly high</p>
  37. 37.🏷️ Every HTML tag starts with which sign? (a) < (b) ( (c) [ (d) {
  38. 38.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <p>Cricket is fun.</p>
    <!-- <p>The red kite</p> -->
  39. 39.🏷️ Which is the closing tag for <em>? (a) <em> (b) <\em> (c) </em> (d) <em/>
  40. 40.📄 What is the first line of an HTML5 page? (a) <body> (b) <head> (c) <html> (d) <!DOCTYPE html>

Answer key

  1. turns HTML into a page
  2. 2
  3. </p>
  4. True
  5. False
  6. True
  7. 2
  8. line 1
  9. 1
  10. <h2>
  11. <a>
  12. False
  13. Hello, world!
  14. line 1
  15. <h1>
  16. A tiger asleep
  17. <ul>
  18. 2
  19. </title>
  20. dog.jpg
  21. </li>
  22. Yes
  23. to describe the image
  24. </i>
  25. True
  26. False
  27. </html>
  28. 4
  29. in the body
  30. <h6>
  31. 2
  32. in the body
  33. 1
  34. starts a new line
  35. to leave notes
  36. 5
  37. <
  38. 1
  39. </em>
  40. <!DOCTYPE html>

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