← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 120 · 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.🔗 Where does this link open?
    <a href="quiz.html">School news</a>
    (a) in a new tab (b) in the same tab
  2. 2.🖼️ Which attribute of <img> is read by screen readers? (a) width (b) alt (c) height (d) src
  3. 3.📄 Which part holds everything you see on the page? (a) the doctype (b) the title (c) the body (d) the head
  4. 4.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
  5. 5.True or false: <img> is an empty tag. (a) False (b) True
  6. 6.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h1> or <h4>? (a) <h3> (b) <h1> (c) <h2> (d) <h4>
  7. 7.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  8. 8.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Our school trip</p> -->
    <p>My best friend</p>
    (a) My best friend (b) I love mangoes. (c) Our school trip
  9. 9.🔍 Which is the odd one out? (a) saves our .html files (b) is where we type code (c) shows line numbers (d) opens web pages for us
  10. 10.True or false: a web server stores a website’s files. (a) True (b) False
  11. 11.True or false: <p> is an empty tag. (a) True (b) False
  12. 12.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a slash / (c) a dot . (d) a hash #
  13. 13.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="150">
  14. 14.🔗 Where does this link open?
    <a href="maths.html" target="_blank">Art corner</a>
    (a) in the same tab (b) in a new tab
  15. 15.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Rain today</p>
    <p>Fun facts</p>
    <p>My pets</p>
    (a) Hello, world! (b) My pets (c) Rain today (d) Fun facts
  16. 16.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a alt="about.html"> (d) <a href="about.html">
  17. 17.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>My best friend</p>
    <p>I love mangoes.</p>
    <h3>Hello, world!</h3>
    <h4>My pets</h4>
  18. 18.📋 Which list tag shows 1, 2, 3 numbers? (a) <ol> (b) <li> (c) <ul>
  19. 19.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) alt (c) src (d) height
  20. 20.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Kites fly high<br>Rivers flow<br>Sky is blue<br>Stars shine</p>
  21. 21.🔗 Which words do you click on?
    <a href="games.html">Art corner</a>
    (a) games.html (b) School news (c) href (d) Art corner
  22. 22.📋 How many items does this list show?
    <ul>
      <li>Guava</li>
      <li>Papaya</li>
      <li>Orange</li>
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Mango</li>
    </ul>
  23. 23.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  24. 24.🔠 Are headings shown in bold by default? (a) Yes (b) No
  25. 25.🔗 What does target="_blank" do to a link? (a) makes it blank (b) opens it in a new tab (c) makes it bold (d) hides the link
  26. 26.📋 How many items does this list show?
    <ul>
      <li>Papaya</li>
      <li>Guava</li>
    </ul>
  27. 27.Which of these is an opening tag? (a) </li> (b) <p> (c) </h1> (d) </body>
  28. 28.🔠 How many heading levels does HTML have? (a) 3 (b) 4 (c) 6 (d) 10
  29. 29.🔗 Which words do you click on?
    <a href="about.html">About us</a>
    (a) href (b) Contact us (c) about.html (d) About us
  30. 30.🔠 Which heading shows the SMALLEST text: <h6>, <h2>, <h3> or <h1>? (a) <h1> (b) <h3> (c) <h6> (d) <h2>
  31. 31.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h1> or <h2>? (a) <h4> (b) <h2> (c) <h6> (d) <h1>
  32. 32.📝 What does <hr> draw? (a) a link (b) a line across the page (c) a picture (d) a table
  33. 33.💬 How does an HTML comment end? (a) --> (b) >> (c) */ (d) //
  34. 34.🔍 One closing tag is missing. Which one?
    <h2>I love mangoes.</h2>
    <u>Cricket is fun.
    <p>Hello, world!</p>
    (a) </u> (b) </h2> (c) </p> (d) </h3>
  35. 35.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Try this poha. (b) Riya’s Recipes (c) index.html (d) All about me
  36. 36.Which of these is true of a web server? (a) colours code to help us (b) shows pages from the web (c) turns HTML into a page (d) stores a website’s files
  37. 37.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
  38. 38.True or false: <br> is an empty tag. (a) True (b) False
  39. 39.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <p>Good morning!</p>
    <!-- <p>My pets</p> -->
    <!-- <p>Hello, world!</p> -->
    <!-- <p>I love mangoes.</p> -->
  40. 40.📋 How many items does this list show?
    <ul>
      <li>Guava</li>
      <li>Papaya</li>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Grapes</li>
    </ul>

Answer key

  1. in the same tab
  2. alt
  3. the body
  4. in the body
  5. True
  6. <h4>
  7. an opening tag
  8. Our school trip
  9. opens web pages for us
  10. True
  11. False
  12. a slash /
  13. 150
  14. in a new tab
  15. Hello, world!
  16. <a href="about.html">
  17. 3
  18. <ol>
  19. alt
  20. 5
  21. Art corner
  22. 6
  23. a closing tag
  24. Yes
  25. opens it in a new tab
  26. 2
  27. <p>
  28. 6
  29. About us
  30. <h6>
  31. <h1>
  32. a line across the page
  33. -->
  34. </u>
  35. Riya’s Recipes
  36. stores a website’s files
  37. Yes
  38. True
  39. 1
  40. 6

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