← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 821 · 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 true of a web browser? (a) is where we type code (b) answers page requests (c) hosts websites online (d) turns HTML into a page
  2. 2.True or false: a code editor answers page requests. (a) True (b) False
  3. 3.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) body (b) Here is my best one. (c) Planets (d) Art Gallery
  4. 4.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) href (d) src
  5. 5.Which of these is an empty tag? (a) <h1> (b) <ul> (c) <img> (d) <li>
  6. 6.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  7. 7.🔗 Which words do you click on?
    <a href="https://example.com">Visit the site</a>
    (a) https://example.com (b) href (c) Maths fun (d) Visit the site
  8. 8.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h1> or <h6>? (a) <h4> (b) <h1> (c) <h5> (d) <h6>
  9. 9.📄 What is the first line of an HTML5 page? (a) <html> (b) <body> (c) <!DOCTYPE html> (d) <head>
  10. 10.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Birds sing<br>Roses are red<br>Sky is blue<br>Kites fly high</p>
  11. 11.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
  12. 12.🏷️ Which is the closing tag for <p>? (a) <\p> (b) </p> (c) <p/> (d) <p>
  13. 13.🔢 In a basic web page file, which comes LAST? (a) </html> (b) <html> (c) </head> (d) <head>
  14. 14.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Kites fly high<br>Birds sing<br>Roses are red<br>Stars shine</p>
  15. 15.True or false: <li> shows bullet points. (a) True (b) False
  16. 16.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <br> (c) <h6> (d) <p>
  17. 17.🧱 HTML gives a web page its ___. (a) colours (b) sound (c) structure (d) speed
  18. 18.Which of these has a closing tag? (a) <input> (b) <br> (c) <h1> (d) <hr>
  19. 19.💬 Why do coders write comments? (a) to show pictures (b) to make links (c) to leave notes (d) to add colour
  20. 20.🔗 Where does this link open?
    <a href="news.html" target="_blank">Visit the site</a>
    (a) in the same tab (b) in a new tab
  21. 21.🔠 Which heading shows the SMALLEST text: <h6>, <h2>, <h5> or <h3>? (a) <h6> (b) <h3> (c) <h5> (d) <h2>
  22. 22.📄 Can HTML on its own run a game loop? (a) Yes (b) No
  23. 23.📋 Which list tag shows bullet points? (a) <ul> (b) <li> (c) <ol>
  24. 24.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <!-- <p>Rain today</p> -->
    <p>My pets</p>
  25. 25.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="200">
    (a) A happy dog (b) Birthday cake (c) width (d) cake.jpg
  26. 26.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  27. 27.🏷️ Which is the closing tag for <strong>? (a) <strong> (b) <strong/> (c) <\strong> (d) </strong>
  28. 28.🔢 In a basic web page file, which comes FIRST? (a) <html> (b) </head> (c) <!DOCTYPE html> (d) <body>
  29. 29.🔗 Which address opens when you click this link?
    <a href="games.html">About us</a>
    (a) about.html (b) games.html (c) contact.html (d) About us
  30. 30.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
  31. 31.True or false: <p> goes in the head. (a) True (b) False
  32. 32.🔤 In “HTML”, what does the L stand for? (a) Link (b) Language (c) Line (d) Laptop
  33. 33.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>My best friend</p>
    <h2>The red kite</h2>
  34. 34.🔗 Which address opens when you click this link?
    <a href="https://example.com">Contact us</a>
    (a) art.html (b) maths.html (c) Contact us (d) https://example.com
  35. 35.🏷️ Which is the closing tag for <i>? (a) <i/> (b) <i> (c) <\i> (d) </i>
  36. 36.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
  37. 37.Which of these is true of a web server? (a) shows line numbers (b) stores a website’s files (c) has an address bar (d) shows pages from the web
  38. 38.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>Hello, world!</p>
    <p>Hello, world!</p>
    <p>My best friend</p>
  39. 39.📄 Which part holds everything you see on the page? (a) the title (b) the body (c) the doctype (d) the head
  40. 40.🔤 In “HTML”, what do the letters HT stand for? (a) Hot Tags (b) High Tech (c) HyperText (d) Home Text

Answer key

  1. turns HTML into a page
  2. False
  3. Planets
  4. href
  5. <img>
  6. a closing tag
  7. Visit the site
  8. <h1>
  9. <!DOCTYPE html>
  10. 5
  11. in the head
  12. </p>
  13. </html>
  14. 5
  15. False
  16. <h1>
  17. structure
  18. <h1>
  19. to leave notes
  20. in a new tab
  21. <h6>
  22. No
  23. <ul>
  24. 1
  25. Birthday cake
  26. No
  27. </strong>
  28. <!DOCTYPE html>
  29. games.html
  30. in the body
  31. False
  32. Language
  33. 2
  34. https://example.com
  35. </i>
  36. in the head
  37. stores a website’s files
  38. 1
  39. the body
  40. HyperText

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