← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 243 · 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 empty tag? (a) <br> (b) <li> (c) <p> (d) <title>
  2. 2.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) editor (c) address (d) attribute
  3. 3.🔢 In a basic web page file, which comes FIRST? (a) <head> (b) <html> (c) <body> (d) <!DOCTYPE html>
  4. 4.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) Riya’s Recipes (b) We won by 5 runs. (c) index.html (d) Match report
  5. 5.💬 Which text will NOT show on the page?
    <!-- <p>Our school trip</p> -->
    <p>Rain today</p>
    <p>My pets</p>
    (a) Our school trip (b) My pets (c) Rain today
  6. 6.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Good morning!</p>
    <p>Fun facts</p>
    <p>My best friend</p>
    (a) Fun facts (b) Hello, world! (c) Good morning! (d) My best friend
  7. 7.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  8. 8.🏷️ HTML marks up text using ___. (a) keys (b) wires (c) tags (d) pixels
  9. 9.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it bold (c) makes it blank (d) hides the link
  10. 10.📋 Which tag goes around each item of a list? (a) <p> (b) <ul> (c) <li> (d) <ol>
  11. 11.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="250">
    (a) cake.jpg (b) Map of India (c) dog.jpg (d) map.png
  12. 12.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="300">
    (a) Map of India (b) width (c) map.png (d) Birthday cake
  13. 13.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  14. 14.Which of these is a closing tag? (a) <h1> (b) <li> (c) </b> (d) <title>
  15. 15.🔢 In a basic web page file, which comes first: “<body>” or “</body>”? (a) </body> (b) <body>
  16. 16.Which of these goes in the head? (a) <p> (b) <link rel="stylesheet"> (c) <a> (d) <table>
  17. 17.🌐 Which one stores a website’s files? (a) a web browser (b) a code editor (c) a web server
  18. 18.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  19. 19.True or false: <li> is one item of a list. (a) False (b) True
  20. 20.🔢 In a basic web page file, which comes LAST? (a) </html> (b) <body> (c) <html> (d) <head>
  21. 21.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <!-- <p>My best friend</p> -->
    <p>Fun facts</p>
    (a) Fun facts (b) My best friend (c) Good morning!
  22. 22.🔗 Where does this link open?
    <a href="about.html">Maths fun</a>
    (a) in a new tab (b) in the same tab
  23. 23.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>Good morning!</p>
    <p>Fun facts</p>
    <h2>I love mangoes.</h2>
    <p>The red kite</p>
  24. 24.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
  25. 25.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Papaya</li>
      <li>Mango</li>
      <li>Litchi</li>
    </ol>
  26. 26.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) We won by 5 runs. (b) Class 7 Blog (c) index.html (d) Easy snacks
  27. 27.📄 Which part holds everything you see on the page? (a) the head (b) the title (c) the doctype (d) the body
  28. 28.🌐 Which one shows pages from the web? (a) a web server (b) a code editor (c) a web browser
  29. 29.🔍 Which is the odd one out? (a) is where we type code (b) hosts websites online (c) answers page requests (d) stores a website’s files
  30. 30.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <p>Good morning!</p>
    <p>Rain today</p>
    <p>Cricket is fun.</p>
    <p>My pets</p>
    <p>The red kite</p>
  31. 31.True or false: <title> has a closing tag. (a) True (b) False
  32. 32.💬 How does an HTML comment end? (a) >> (b) --> (c) */ (d) //
  33. 33.📋 What number does the browser show next to “Banana”?
    <ol start="8">
      <li>Papaya</li>
      <li>Guava</li>
      <li>Banana</li>
    </ol>
  34. 34.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Roses are red<br>Birds sing<br>Kites fly high<br>Sky is blue</p>
  35. 35.📋 Does this list show bullets or numbers?
    <ul>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Guava</li>
    </ul>
    (a) numbers (b) bullets
  36. 36.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h4> or <h6>? (a) <h6> (b) <h3> (c) <h1> (d) <h4>
  37. 37.True or false: <title> is an empty tag. (a) False (b) True
  38. 38.🔍 Which is the odd one out? (a) is where we type code (b) saves our .html files (c) colours code to help us (d) shows pages from the web
  39. 39.True or false: in <img>, src tells which image to load. (a) True (b) False
  40. 40.True or false: HTML on its own can make links to pages. (a) False (b) True

Answer key

  1. <br>
  2. element
  3. <!DOCTYPE html>
  4. Riya’s Recipes
  5. Our school trip
  6. Hello, world!
  7. No
  8. tags
  9. opens it in a new tab
  10. <li>
  11. map.png
  12. Map of India
  13. a closing tag
  14. </b>
  15. <body>
  16. <link rel="stylesheet">
  17. a web server
  18. an empty tag
  19. True
  20. </html>
  21. My best friend
  22. in the same tab
  23. 2
  24. in the body
  25. 5
  26. Class 7 Blog
  27. the body
  28. a web browser
  29. is where we type code
  30. 6
  31. True
  32. -->
  33. 10
  34. 5
  35. bullets
  36. <h1>
  37. False
  38. shows pages from the web
  39. True
  40. True

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