← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 743 · 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: in <img>, height tells which image to load. (a) True (b) False
  2. 2.🖼️ Which tag puts a picture on a page? (a) <p> (b) <img> (c) <a> (d) <pic>
  3. 3.🔗 Which words do you click on?
    <a href="about.html">Art corner</a>
    (a) about.html (b) href (c) School news (d) Art corner
  4. 4.🌐 Which one opens web pages for us? (a) a web browser (b) a code editor (c) a web server
  5. 5.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) We won by 5 runs. (b) Riya’s Recipes (c) body (d) All about me
  6. 6.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  7. 7.🔗 Where does this link open?
    <a href="art.html">School news</a>
    (a) in a new tab (b) in the same tab
  8. 8.Which of these has a closing tag? (a) <input> (b) <br> (c) <meta> (d) <ul>
  9. 9.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="350">
    (a) cake.jpg (b) A red kite (c) map.png (d) kite.png
  10. 10.🔗 Where does this link open?
    <a href="maths.html" target="_blank">Play games</a>
    (a) in a new tab (b) in the same tab
  11. 11.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
  12. 12.🏷️ Which is the closing tag for <h3>? (a) </h3> (b) <h3> (c) <\h3> (d) <h3/>
  13. 13.🔍 One closing tag is missing. Which one?
    <b>The red kite</b>
    <p>Hello, world!
    <h1>My best friend</h1>
    (a) </b> (b) </p> (c) </strong> (d) </h1>
  14. 14.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h4> or <h3>? (a) <h1> (b) <h4> (c) <h5> (d) <h3>
  15. 15.True or false: a web server has an address bar. (a) True (b) False
  16. 16.True or false: <li> goes inside ul or ol. (a) False (b) True
  17. 17.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h4> or <h2>? (a) <h5> (b) <h4> (c) <h2> (d) <h3>
  18. 18.🔍 One closing tag is missing. Which one?
    <p>Hello, world!
    <em>My pets</em>
    <h1>The red kite</h1>
    (a) </em> (b) </p> (c) </h1> (d) </h3>
  19. 19.🔗 Which words do you click on?
    <a href="art.html">Contact us</a>
    (a) art.html (b) Visit the site (c) Contact us (d) href
  20. 20.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>The red kite</p>
    <h2>My pets</h2>
  21. 21.True or false: in <img>, height sets how tall it is. (a) True (b) False
  22. 22.📝 Does <meta> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  23. 23.📋 Which tag goes around each item of a list? (a) <ul> (b) <ol> (c) <p> (d) <li>
  24. 24.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <!-- <p>Good morning!</p> -->
    <p>The red kite</p>
    <!-- <p>I love mangoes.</p> -->
  25. 25.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h1> or <h2>? (a) <h5> (b) <h1> (c) <h6> (d) <h2>
  26. 26.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="100">
  27. 27.🔍 Which line is missing its closing tag?
    line 1: <em>My best friend</em>
    line 2: <strong>Cricket is fun.
    line 3: <i>Good morning!</i>
    (a) line 1 (b) line 2 (c) line 3
  28. 28.🔗 Which address opens when you click this link?
    <a href="quiz.html">Take the quiz</a>
    (a) games.html (b) about.html (c) quiz.html (d) Take the quiz
  29. 29.🔗 Where does this link open?
    <a href="news.html">Maths fun</a>
    (a) in the same tab (b) in a new tab
  30. 30.🔗 Which address opens when you click this link?
    <a href="contact.html">Play games</a>
    (a) contact.html (b) maths.html (c) https://example.com (d) Play games
  31. 31.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <ul> (c) <br> (d) <hr>
  32. 32.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="100">
    (a) dog.jpg (b) The full moon (c) width (d) A happy dog
  33. 33.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Here is my best one. (b) Space Facts (c) All about me (d) index.html
  34. 34.📋 Does this list show bullets or numbers?
    <ol>
      <li>Jamun</li>
      <li>Mango</li>
    </ol>
    (a) numbers (b) bullets
  35. 35.📄 Can HTML on its own keep a high score? (a) No (b) Yes
  36. 36.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) makes it bold (d) opens it in a new tab
  37. 37.🔍 Which is the odd one out? (a) opens web pages for us (b) shows pages from the web (c) answers page requests (d) has an address bar
  38. 38.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="100">
    (a) A happy dog (b) width (c) cake.jpg (d) Birthday cake
  39. 39.📄 Can HTML on its own run a game loop? (a) No (b) Yes
  40. 40.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>My pets</p> -->
    <p>Hello, world!</p>
    <!-- <p>I love mangoes.</p> -->

Answer key

  1. False
  2. <img>
  3. Art corner
  4. a web browser
  5. All about me
  6. Yes
  7. in the same tab
  8. <ul>
  9. kite.png
  10. in a new tab
  11. in the body
  12. </h3>
  13. </p>
  14. <h1>
  15. False
  16. True
  17. <h2>
  18. </p>
  19. Contact us
  20. 2
  21. True
  22. an empty tag
  23. <li>
  24. 2
  25. <h1>
  26. 100
  27. line 2
  28. quiz.html
  29. in the same tab
  30. contact.html
  31. <ol>
  32. A happy dog
  33. Space Facts
  34. numbers
  35. No
  36. opens it in a new tab
  37. answers page requests
  38. Birthday cake
  39. No
  40. 1

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