← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 607 · 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.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <!-- <p>The red kite</p> -->
    <p>Rain today</p>
  2. 2.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h3> or <h2>? (a) <h2> (b) <h1> (c) <h6> (d) <h3>
  3. 3.🔗 Which address opens when you click this link?
    <a href="games.html">School news</a>
    (a) about.html (b) contact.html (c) School news (d) games.html
  4. 4.True or false: <img> goes in the head. (a) True (b) False
  5. 5.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>Fun facts</p>
    <p>Our school trip</p>
    <p>I love mangoes.</p>
    (a) Fun facts (b) Our school trip (c) Rain today (d) I love mangoes.
  6. 6.True or false: in <img>, src names the picture file. (a) False (b) True
  7. 7.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  8. 8.🔢 In a basic web page file, which comes first: “</html>” or “</body>”? (a) </body> (b) </html>
  9. 9.🔗 Which address opens when you click this link?
    <a href="about.html">Visit the site</a>
    (a) contact.html (b) Visit the site (c) https://example.com (d) about.html
  10. 10.💬 How does an HTML comment end? (a) */ (b) >> (c) // (d) -->
  11. 11.Which of these has a closing tag? (a) <ul> (b) <img> (c) <input> (d) <hr>
  12. 12.🔗 Which address opens when you click this link?
    <a href="quiz.html">Play games</a>
    (a) Play games (b) about.html (c) quiz.html (d) games.html
  13. 13.🔍 Which is the odd one out? (a) saves our .html files (b) answers page requests (c) shows line numbers (d) colours code to help us
  14. 14.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <meta charset="utf-8"> (c) <title> (d) <h1>
  15. 15.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h6> or <h2>? (a) <h2> (b) <h3> (c) <h4> (d) <h6>
  16. 16.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <p>Good morning!</p>
    <!-- <p>My pets</p> -->
    <p>The red kite</p>
    (a) Good morning! (b) The red kite (c) Hello, world! (d) My pets
  17. 17.📋 How many items does this list show?
    <ul>
      <li>Guava</li>
      <li>Papaya</li>
    </ul>
  18. 18.📝 What does <p> make? (a) a picture (b) a link (c) a table (d) a paragraph
  19. 19.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Rivers flow<br>Birds sing<br>Sky is blue</p>
  20. 20.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <p>My best friend</p>
    <p>Our school trip</p>
    <!-- <p>Hello, world!</p> -->
  21. 21.🔗 Which address opens when you click this link?
    <a href="https://example.com">About us</a>
    (a) About us (b) https://example.com (c) art.html (d) maths.html
  22. 22.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h1> or <h3>? (a) <h1> (b) <h6> (c) <h3> (d) <h2>
  23. 23.📋 What number does the browser show next to “Orange”?
    <ol>
      <li>Grapes</li>
      <li>Guava</li>
      <li>Litchi</li>
      <li>Mango</li>
      <li>Banana</li>
      <li>Orange</li>
    </ol>
  24. 24.💬 Which text will NOT show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>My best friend</p>
    <p>Fun facts</p>
    (a) My best friend (b) Fun facts (c) Cricket is fun.
  25. 25.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="50">
    (a) bus.jpg (b) dog.jpg (c) moon.png (d) A happy dog
  26. 26.True or false: in <img>, alt names the picture file. (a) False (b) True
  27. 27.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
  28. 28.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="250">
  29. 29.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
  30. 30.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h3>I love mangoes.</h3>
    <p>My best friend</p>
    <h2>I love mangoes.</h2>
  31. 31.🔗 Which attribute holds the address of a link? (a) href (b) alt (c) id (d) src
  32. 32.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <!-- <p>Hello, world!</p> -->
    <p>Fun facts</p>
    <p>My pets</p>
    (a) My pets (b) Rain today (c) Fun facts (d) Hello, world!
  33. 33.💬 Which text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>The red kite</p>
    <p>Fun facts</p>
    (a) The red kite (b) My pets (c) Fun facts
  34. 34.True or false: <title> goes in the body. (a) True (b) False
  35. 35.📄 What is the first line of an HTML5 page? (a) <html> (b) <body> (c) <!DOCTYPE html> (d) <head>
  36. 36.🏷️ Is </p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  37. 37.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Sky is blue</p>
  38. 38.📝 What do we need to write HTML? (a) a paintbrush (b) a microphone (c) a plain text editor (d) a printer
  39. 39.💬 Why do coders write comments? (a) to add colour (b) to leave notes (c) to show pictures (d) to make links
  40. 40.🏷️ Every HTML tag starts with which sign? (a) { (b) [ (c) < (d) (

Answer key

  1. 2
  2. <h6>
  3. games.html
  4. False
  5. Rain today
  6. True
  7. an opening tag
  8. </body>
  9. about.html
  10. -->
  11. <ul>
  12. quiz.html
  13. answers page requests
  14. <h1>
  15. <h6>
  16. My pets
  17. 2
  18. a paragraph
  19. 4
  20. 3
  21. https://example.com
  22. <h1>
  23. 6
  24. Cricket is fun.
  25. dog.jpg
  26. False
  27. in the body
  28. 250
  29. in the head
  30. 3
  31. href
  32. Hello, world!
  33. My pets
  34. False
  35. <!DOCTYPE html>
  36. a closing tag
  37. 2
  38. a plain text editor
  39. to leave notes
  40. <

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