← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 911 · 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.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Roses are red<br>Sky is blue<br>Kites fly high</p>
  2. 2.🔗 Which address opens when you click this link?
    <a href="about.html">Play games</a>
    (a) https://example.com (b) about.html (c) Play games (d) contact.html
  3. 3.🔍 Which line is missing its closing tag?
    line 1: <h1>My pets</h1>
    line 2: <em>Hello, world!</em>
    line 3: <strong>Fun facts
    (a) line 3 (b) line 1 (c) line 2
  4. 4.🧱 HTML gives a web page its ___. (a) colours (b) speed (c) structure (d) sound
  5. 5.🔠 How many heading levels does HTML have? (a) 6 (b) 3 (c) 4 (d) 10
  6. 6.🔗 Where does this link open?
    <a href="contact.html" target="_blank">About us</a>
    (a) in the same tab (b) in a new tab
  7. 7.🔗 Which words do you click on?
    <a href="https://example.com">Visit the site</a>
    (a) Visit the site (b) https://example.com (c) Maths fun (d) href
  8. 8.True or false: a code editor is where we type code. (a) True (b) False
  9. 9.🔗 Where does this link open?
    <a href="art.html" target="_blank">School news</a>
    (a) in a new tab (b) in the same tab
  10. 10.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="150">
    (a) dog.jpg (b) A happy dog (c) The full moon (d) width
  11. 11.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Class 7 Blog (b) Here is my best one. (c) body (d) Planets
  12. 12.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="150">
    (a) moon.png (b) width (c) The full moon (d) Our school bus
  13. 13.📄 Can HTML on its own make headings? (a) No (b) Yes
  14. 14.🌐 Which one has an address bar? (a) a web server (b) a code editor (c) a web browser
  15. 15.📋 Which tag goes around each item of a list? (a) <ul> (b) <p> (c) <ol> (d) <li>
  16. 16.🏷️ Which is the closing tag for <i>? (a) </i> (b) <i> (c) <i/> (d) <\i>
  17. 17.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="300">
    (a) width (b) tiger.jpg (c) A tiger asleep (d) A red kite
  18. 18.🏷️ Which is the closing tag for <p>? (a) <p> (b) </p> (c) <p/> (d) <\p>
  19. 19.True or false: <title> goes in the head. (a) False (b) True
  20. 20.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h1> or <h6>? (a) <h6> (b) <h3> (c) <h2> (d) <h1>
  21. 21.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  22. 22.📝 Does <hr> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  23. 23.🔗 Which address opens when you click this link?
    <a href="contact.html">Take the quiz</a>
    (a) Take the quiz (b) contact.html (c) https://example.com (d) maths.html
  24. 24.🔍 One closing tag is missing. Which one?
    <h3>Good morning!
    <u>My pets</u>
    <em>My best friend</em>
    (a) </strong> (b) </em> (c) </h3> (d) </u>
  25. 25.Which of these has a closing tag? (a) <img> (b) <hr> (c) <meta> (d) <p>
  26. 26.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a hash # (c) a dollar $ (d) a slash /
  27. 27.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <ol> (d) <br>
  28. 28.🏷️ Which is the closing tag for <b>? (a) <b/> (b) <b> (c) <\b> (d) </b>
  29. 29.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>Rain today</p>
    <!-- <p>Fun facts</p> -->
    (a) The red kite (b) Fun facts (c) Rain today
  30. 30.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h3> or <h6>? (a) <h6> (b) <h5> (c) <h3> (d) <h2>
  31. 31.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <a> (d) <img>
  32. 32.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <!-- <p>Rain today</p> -->
    <p>Fun facts</p>
    <p>The red kite</p>
    (a) Rain today (b) My pets (c) Fun facts (d) The red kite
  33. 33.🖼️ 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
  34. 34.True or false: in <img>, src tells which image to load. (a) False (b) True
  35. 35.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>The red kite</p>
    <p>Our school trip</p>
    <p>Rain today</p>
    <p>Good morning!</p>
  36. 36.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h6> or <h4>? (a) <h5> (b) <h1> (c) <h4> (d) <h6>
  37. 37.🔍 Which is the odd one out? (a) opens web pages for us (b) turns HTML into a page (c) has an address bar (d) is where we type code
  38. 38.🌐 Which one colours code to help us? (a) a code editor (b) a web browser (c) a web server
  39. 39.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="400">
    (a) cake.jpg (b) dog.jpg (c) moon.png (d) Birthday cake
  40. 40.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>Good morning!</p>
    <h2>Hello, world!</h2>

Answer key

  1. 4
  2. about.html
  3. line 3
  4. structure
  5. 6
  6. in a new tab
  7. Visit the site
  8. True
  9. in a new tab
  10. A happy dog
  11. Planets
  12. The full moon
  13. Yes
  14. a web browser
  15. <li>
  16. </i>
  17. A tiger asleep
  18. </p>
  19. True
  20. <h6>
  21. Yes
  22. an empty tag
  23. contact.html
  24. </h3>
  25. <p>
  26. a slash /
  27. <ol>
  28. </b>
  29. Fun facts
  30. <h2>
  31. <a>
  32. Rain today
  33. A happy dog
  34. True
  35. 4
  36. <h1>
  37. is where we type code
  38. a code editor
  39. cake.jpg
  40. 2

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