← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 322 · 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>Hello, world!</p>
    <!-- <p>My pets</p> -->
    <p>Fun facts</p>
  2. 2.📝 What does <br> do? (a) makes a list (b) adds a picture (c) starts a new line (d) makes text bold
  3. 3.📋 How many items does this list show?
    <ol>
      <li>Papaya</li>
      <li>Guava</li>
      <li>Orange</li>
      <li>Mango</li>
    </ol>
  4. 4.🔗 Which address opens when you click this link?
    <a href="news.html">Contact us</a>
    (a) games.html (b) news.html (c) Contact us (d) quiz.html
  5. 5.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) alt (c) src (d) width
  6. 6.🔢 In a basic web page file, which comes FIRST? (a) </html> (b) <html> (c) <!DOCTYPE html> (d) </head>
  7. 7.🔗 Which words do you click on?
    <a href="games.html">Take the quiz</a>
    (a) Take the quiz (b) Play games (c) games.html (d) href
  8. 8.Which of these goes in the body? (a) <style> (b) <img> (c) <meta charset="utf-8"> (d) <title>
  9. 9.🔠 How many heading levels does HTML have? (a) 4 (b) 6 (c) 10 (d) 3
  10. 10.Which of these is an empty tag? (a) <hr> (b) <ul> (c) <p> (d) <title>
  11. 11.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <p>Fun facts</p>
  12. 12.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  13. 13.📄 Which part holds everything you see on the page? (a) the doctype (b) the body (c) the title (d) the head
  14. 14.💬 Which text will NOT show on the page?
    <!-- <p>Our school trip</p> -->
    <p>My pets</p>
    <p>Fun facts</p>
    (a) Fun facts (b) My pets (c) Our school trip
  15. 15.🔗 Which address opens when you click this link?
    <a href="maths.html">School news</a>
    (a) art.html (b) news.html (c) School news (d) maths.html
  16. 16.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to colour it (c) to load it faster (d) to describe the image
  17. 17.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) body (b) Planets (c) Cricket Club (d) I like to read.
  18. 18.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <h2>Good morning!</h2>
    <p>I love mangoes.</p>
    <h2>Hello, world!</h2>
    <p>Hello, world!</p>
    <p>My best friend</p>
  19. 19.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it bold (c) hides the link (d) makes it blank
  20. 20.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <h2>Rain today</h2>
    <h2>Our school trip</h2>
    <p>The red kite</p>
    <h2>Rain today</h2>
    <p>My best friend</p>
  21. 21.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
  22. 22.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>I love mangoes.</p> -->
    <p>My pets</p>
  23. 23.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  24. 24.Which of these is an opening tag? (a) </body> (b) <p> (c) </h1> (d) </p>
  25. 25.True or false: <li> shows 1, 2, 3 numbers. (a) False (b) True
  26. 26.🌐 Which one opens web pages for us? (a) a web server (b) a code editor (c) a web browser
  27. 27.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>My pets</p>
    <p>Cricket is fun.</p>
    <h4>Hello, world!</h4>
  28. 28.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) width (c) src (d) height
  29. 29.📋 How many items does this list show?
    <ul>
      <li>Orange</li>
      <li>Mango</li>
      <li>Grapes</li>
      <li>Banana</li>
      <li>Litchi</li>
    </ul>
  30. 30.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h4> or <h6>? (a) <h4> (b) <h3> (c) <h2> (d) <h6>
  31. 31.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <hr> (d) <ol>
  32. 32.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <p>Good morning!</p>
    <p>Hello, world!</p>
    <!-- <p>Rain today</p> -->
    <!-- <p>Fun facts</p> -->
  33. 33.🔗 Which words do you click on?
    <a href="art.html">School news</a>
    (a) href (b) art.html (c) School news (d) Take the quiz
  34. 34.Which of these is true of a web server? (a) shows pages from the web (b) answers page requests (c) turns HTML into a page (d) shows line numbers
  35. 35.True or false: <title> goes in the body. (a) True (b) False
  36. 36.📝 What does <hr> draw? (a) a link (b) a line across the page (c) a table (d) a picture
  37. 37.📋 Which tag goes around each item of a list? (a) <li> (b) <ol> (c) <p> (d) <ul>
  38. 38.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <!-- <p>Our school trip</p> -->
    <p>Cricket is fun.</p>
    <!-- <p>My pets</p> -->
    <p>My best friend</p>
  39. 39.True or false: in <img>, alt is read by screen readers. (a) False (b) True
  40. 40.True or false: in <img>, height describes the picture. (a) True (b) False

Answer key

  1. 2
  2. starts a new line
  3. 4
  4. news.html
  5. alt
  6. <!DOCTYPE html>
  7. Take the quiz
  8. <img>
  9. 6
  10. <hr>
  11. 1
  12. has a closing tag
  13. the body
  14. Our school trip
  15. maths.html
  16. to describe the image
  17. Planets
  18. 4
  19. opens it in a new tab
  20. 3
  21. in the head
  22. 2
  23. has a closing tag
  24. <p>
  25. False
  26. a web browser
  27. 2
  28. height
  29. 5
  30. <h2>
  31. <ol>
  32. 3
  33. School news
  34. answers page requests
  35. False
  36. a line across the page
  37. <li>
  38. 2
  39. True
  40. False

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