← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 774 · 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.True or false: <ul> shows bullet points. (a) False (b) True
  2. 2.💬 Why do coders write comments? (a) to make links (b) to show pictures (c) to leave notes (d) to add colour
  3. 3.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h1> or <h3>? (a) <h4> (b) <h1> (c) <h2> (d) <h3>
  4. 4.True or false: a web server opens web pages for us. (a) False (b) True
  5. 5.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <!-- <p>Our school trip</p> -->
    <p>Rain today</p>
  6. 6.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a hash # (c) a dollar $ (d) a dot .
  7. 7.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) alt (c) src (d) width
  8. 8.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h4>My best friend</h4>
    <p>My best friend</p>
  9. 9.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
  10. 10.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a alt="about.html"> (c) <a href="about.html"> (d) <link about.html>
  11. 11.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an attribute (c) a comment (d) an element name
  12. 12.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h6> or <h2>? (a) <h3> (b) <h1> (c) <h6> (d) <h2>
  13. 13.True or false: HTML on its own cannot count button clicks. (a) True (b) False
  14. 14.🌐 Which one stores a website’s files? (a) a code editor (b) a web browser (c) a web server
  15. 15.🔗 Which tag makes a clickable link? (a) <link> (b) <a> (c) <p> (d) <img>
  16. 16.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>Hello, world!</p>
    <h4>Our school trip</h4>
    <p>I love mangoes.</p>
    <h2>Cricket is fun.</h2>
  17. 17.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h3> or <h2>? (a) <h3> (b) <h2> (c) <h5> (d) <h6>
  18. 18.🔗 Which address opens when you click this link?
    <a href="about.html">Take the quiz</a>
    (a) about.html (b) https://example.com (c) contact.html (d) Take the quiz
  19. 19.📋 How many items does this list show?
    <ul>
      <li>Banana</li>
      <li>Litchi</li>
    </ul>
  20. 20.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h1> or <h4>? (a) <h4> (b) <h6> (c) <h1> (d) <h2>
  21. 21.🔗 Which words do you click on?
    <a href="news.html">Play games</a>
    (a) About us (b) news.html (c) Play games (d) href
  22. 22.📄 Where does the text of <title> appear? (a) in a big heading (b) at the bottom (c) on the browser tab (d) nowhere
  23. 23.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>My best friend</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>My pets</p>
    (a) My pets (b) Cricket is fun. (c) I love mangoes. (d) My best friend
  24. 24.True or false: <b> is an empty tag. (a) False (b) True
  25. 25.True or false: <meta charset="utf-8"> goes in the head. (a) True (b) False
  26. 26.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Cricket Club (b) index.html (c) Welcome! (d) Thanks for visiting.
  27. 27.🌍 Which program shows a web page to us? (a) a calculator (b) a paint program (c) a music player (d) a web browser
  28. 28.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Litchi</li>
      <li>Mango</li>
    </ol>
  29. 29.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Sky is blue</p>
  30. 30.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="200">
    (a) dog.jpg (b) The full moon (c) A happy dog (d) width
  31. 31.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h5> or <h4>? (a) <h2> (b) <h4> (c) <h3> (d) <h5>
  32. 32.🔠 Which tag is the least important heading? (a) <p> (b) <h3> (c) <h6> (d) <h1>
  33. 33.🔍 Which line is missing its closing tag?
    line 1: <em>Cricket is fun.</em>
    line 2: <i>The red kite
    line 3: <h1>Fun facts</h1>
    (a) line 3 (b) line 2 (c) line 1
  34. 34.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <p>Fun facts</p>
    <p>Hello, world!</p>
    <p>Our school trip</p>
    <!-- <p>Rain today</p> -->
  35. 35.True or false: <ol> shows bullet points. (a) True (b) False
  36. 36.True or false: HTML on its own can make bullet lists. (a) False (b) True
  37. 37.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <!-- <p>I love mangoes.</p> -->
    <p>Hello, world!</p>
  38. 38.📋 What number does the browser show next to “Mango”?
    <ol>
      <li>Papaya</li>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Orange</li>
    </ol>
  39. 39.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <h6> (c) <p> (d) <br>
  40. 40.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <br> (c) <ul> (d) <ol>

Answer key

  1. True
  2. to leave notes
  3. <h1>
  4. False
  5. 2
  6. a slash /
  7. alt
  8. 2
  9. in the body
  10. <a href="about.html">
  11. an attribute
  12. <h1>
  13. True
  14. a web server
  15. <a>
  16. 3
  17. <h2>
  18. about.html
  19. 2
  20. <h6>
  21. Play games
  22. on the browser tab
  23. Cricket is fun.
  24. False
  25. True
  26. Cricket Club
  27. a web browser
  28. 4
  29. 2
  30. A happy dog
  31. <h2>
  32. <h6>
  33. line 2
  34. 4
  35. False
  36. True
  37. 1
  38. 4
  39. <h1>
  40. <ol>

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