← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 326 · 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.Which of these is an opening tag? (a) </p> (b) </li> (c) <li> (d) </b>
  2. 2.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>I love mangoes.</p>
    <p>My pets</p>
    <p>Good morning!</p>
  3. 3.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Cricket is fun.</p>
    <p>Hello, world!</p>
  4. 4.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a dot . (c) a dollar $ (d) a hash #
  5. 5.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) width (c) height (d) alt
  6. 6.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h3> or <h4>? (a) <h4> (b) <h3> (c) <h2> (d) <h1>
  7. 7.📋 Which list tag lists things in any order? (a) <ol> (b) <li> (c) <ul>
  8. 8.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Here is my best one. (b) Easy snacks (c) body (d) Space Facts
  9. 9.True or false: in <img>, src names the picture file. (a) True (b) False
  10. 10.Which of these is true of a web browser? (a) saves our .html files (b) sends pages over the net (c) opens web pages for us (d) hosts websites online
  11. 11.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  12. 12.Which of these is an empty tag? (a) <ul> (b) <h1> (c) <li> (d) <meta>
  13. 13.🔗 Which attribute holds the address of a link? (a) href (b) src (c) alt (d) id
  14. 14.True or false: <ol> is an unordered list. (a) False (b) True
  15. 15.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Easy snacks (b) Try this poha. (c) Riya’s Recipes (d) index.html
  16. 16.📄 Can HTML on its own pick a random number? (a) No (b) Yes
  17. 17.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a href="about.html"> (c) <link about.html> (d) <a alt="about.html">
  18. 18.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h6> or <h3>? (a) <h5> (b) <h3> (c) <h4> (d) <h6>
  19. 19.True or false: HTML on its own cannot pick a random number. (a) False (b) True
  20. 20.True or false: <b> is an empty tag. (a) True (b) False
  21. 21.🌐 Which one answers page requests? (a) a web browser (b) a code editor (c) a web server
  22. 22.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>Good morning!</p>
    <p>Hello, world!</p>
    (a) Cricket is fun. (b) Hello, world! (c) My best friend (d) Good morning!
  23. 23.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="100">
    (a) tiger.jpg (b) kite.png (c) A tiger asleep (d) map.png
  24. 24.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
  25. 25.True or false: <link rel="stylesheet"> goes in the body. (a) True (b) False
  26. 26.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="400">
  27. 27.💬 How does an HTML comment start? (a) // (b) <!-- (c) # (d) /*
  28. 28.📋 Which list tag is an ordered list? (a) <li> (b) <ol> (c) <ul>
  29. 29.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="350">
  30. 30.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  31. 31.🔠 Which heading shows the SMALLEST text: <h6>, <h5>, <h3> or <h2>? (a) <h5> (b) <h3> (c) <h6> (d) <h2>
  32. 32.📄 What is the first line of an HTML5 page? (a) <head> (b) <html> (c) <!DOCTYPE html> (d) <body>
  33. 33.📋 Which tag goes around each item of a list? (a) <li> (b) <p> (c) <ol> (d) <ul>
  34. 34.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="250">
    (a) A red kite (b) tiger.jpg (c) A tiger asleep (d) width
  35. 35.📋 Which list tag goes inside ul or ol? (a) <ol> (b) <ul> (c) <li>
  36. 36.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h5> or <h3>? (a) <h5> (b) <h3> (c) <h4> (d) <h6>
  37. 37.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  38. 38.True or false: a web server opens web pages for us. (a) True (b) False
  39. 39.Which of these is a closing tag? (a) <h1> (b) </title> (c) <li> (d) <b>
  40. 40.📋 How many items does this list show?
    <ol>
      <li>Grapes</li>
      <li>Orange</li>
      <li>Papaya</li>
    </ol>

Answer key

  1. <li>
  2. 1
  3. 2
  4. a slash /
  5. alt
  6. <h1>
  7. <ul>
  8. Easy snacks
  9. True
  10. opens web pages for us
  11. an opening tag
  12. <meta>
  13. href
  14. False
  15. Riya’s Recipes
  16. No
  17. <a href="about.html">
  18. <h6>
  19. True
  20. False
  21. a web server
  22. Cricket is fun.
  23. tiger.jpg
  24. in the head
  25. False
  26. 400
  27. <!--
  28. <ol>
  29. 350
  30. an opening tag
  31. <h6>
  32. <!DOCTYPE html>
  33. <li>
  34. A tiger asleep
  35. <li>
  36. <h3>
  37. an opening tag
  38. False
  39. </title>
  40. 3

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