← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 380 · 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.📄 Can HTML on its own keep a high score? (a) No (b) Yes
  2. 2.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <!-- <p>Good morning!</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <p>My pets</p>
    <p>Rain today</p>
  3. 3.Which of these goes in the head? (a) <ul> (b) <h1> (c) <link rel="stylesheet"> (d) <table>
  4. 4.🔗 Which words do you click on?
    <a href="news.html">Contact us</a>
    (a) Contact us (b) Visit the site (c) href (d) news.html
  5. 5.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <p>Hello, world!</p>
    <p>My pets</p>
  6. 6.📋 How many items does this list show?
    <ul>
      <li>Guava</li>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Papaya</li>
      <li>Grapes</li>
    </ul>
  7. 7.🔍 Which is the odd one out? (a) shows pages from the web (b) is where we type code (c) shows line numbers (d) saves our .html files
  8. 8.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h6> or <h2>? (a) <h2> (b) <h1> (c) <h4> (d) <h6>
  9. 9.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
  10. 10.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as a dot (c) as 5 spaces (d) as one space
  11. 11.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  12. 12.🔍 One closing tag is missing. Which one?
    <h2>Hello, world!</h2>
    <i>Rain today</i>
    <b>The red kite
    (a) </h3> (b) </i> (c) </b> (d) </h2>
  13. 13.🔗 Which words do you click on?
    <a href="https://example.com">Contact us</a>
    (a) Visit the site (b) href (c) Contact us (d) https://example.com
  14. 14.🔗 Which words do you click on?
    <a href="quiz.html">Take the quiz</a>
    (a) quiz.html (b) Take the quiz (c) Play games (d) href
  15. 15.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  16. 16.📋 Which list tag lists things in any order? (a) <ol> (b) <ul> (c) <li>
  17. 17.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="350">
  18. 18.True or false: HTML on its own can add pictures to a page. (a) False (b) True
  19. 19.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <style> (c) <title> (d) <a>
  20. 20.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>My best friend</p>
    <!-- <p>Good morning!</p> -->
    (a) Good morning! (b) I love mangoes. (c) My best friend
  21. 21.🔍 One closing tag is missing. Which one?
    <h3>Our school trip
    <u>Cricket is fun.</u>
    <i>I love mangoes.</i>
    (a) </u> (b) </i> (c) </em> (d) </h3>
  22. 22.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) href (d) src
  23. 23.🔢 In a basic web page file, which comes FIRST? (a) <head> (b) <!DOCTYPE html> (c) <html> (d) <body>
  24. 24.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
  25. 25.🔗 Which words do you click on?
    <a href="contact.html">School news</a>
    (a) contact.html (b) School news (c) Take the quiz (d) href
  26. 26.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  27. 27.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <!-- <p>The red kite</p> -->
    <!-- <p>Good morning!</p> -->
    <p>My pets</p>
  28. 28.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h2> or <h6>? (a) <h3> (b) <h6> (c) <h5> (d) <h2>
  29. 29.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <p>Fun facts</p>
    <p>Cricket is fun.</p>
    <!-- <p>Rain today</p> -->
  30. 30.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>My best friend</p>
    <!-- <p>Good morning!</p> -->
    <!-- <p>My pets</p> -->
  31. 31.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <!-- <p>Hello, world!</p> -->
    <p>Rain today</p>
    <p>My pets</p>
  32. 32.True or false: <li> lists steps in order. (a) False (b) True
  33. 33.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Space Facts (b) Planets (c) Mars is red. (d) body
  34. 34.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="300">
  35. 35.📋 What number does the browser show next to “Litchi”?
    <ol start="7">
      <li>Jamun</li>
      <li>Mango</li>
      <li>Litchi</li>
    </ol>
  36. 36.🖼️ Which attribute of <img> is read by screen readers? (a) width (b) alt (c) src (d) height
  37. 37.🔠 Are headings shown in bold by default? (a) Yes (b) No
  38. 38.🔗 Where does this link open?
    <a href="maths.html">About us</a>
    (a) in the same tab (b) in a new tab
  39. 39.🔗 Which words do you click on?
    <a href="contact.html">About us</a>
    (a) href (b) Contact us (c) contact.html (d) About us
  40. 40.📝 What does <hr> draw? (a) a picture (b) a link (c) a line across the page (d) a table

Answer key

  1. No
  2. 2
  3. <link rel="stylesheet">
  4. Contact us
  5. 2
  6. 5
  7. shows pages from the web
  8. <h6>
  9. <ul>
  10. as one space
  11. No
  12. </b>
  13. Contact us
  14. Take the quiz
  15. a closing tag
  16. <ul>
  17. 350
  18. True
  19. <a>
  20. Good morning!
  21. </h3>
  22. href
  23. <!DOCTYPE html>
  24. Yes
  25. School news
  26. a closing tag
  27. 2
  28. <h2>
  29. 3
  30. 1
  31. 2
  32. False
  33. Planets
  34. 300
  35. 9
  36. alt
  37. Yes
  38. in the same tab
  39. About us
  40. a line across the page

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