← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 437 · 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.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <h2>Our school trip</h2>
    <h2>My pets</h2>
    <p>I love mangoes.</p>
    <p>Rain today</p>
    <p>My pets</p>
  2. 2.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Kites fly high<br>Sky is blue<br>Roses are red</p>
  3. 3.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>Our school trip</p>
    <p>I love mangoes.</p>
  4. 4.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h6> or <h1>? (a) <h3> (b) <h6> (c) <h4> (d) <h1>
  5. 5.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a hash # (d) a slash /
  6. 6.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Language (c) Line (d) Link
  7. 7.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) My Hobbies (b) Easy snacks (c) index.html (d) Try this poha.
  8. 8.🔗 Where does this link open?
    <a href="maths.html" target="_blank">Visit the site</a>
    (a) in a new tab (b) in the same tab
  9. 9.🔗 Which words do you click on?
    <a href="https://example.com">Play games</a>
    (a) About us (b) href (c) https://example.com (d) Play games
  10. 10.🔗 Which tag makes a clickable link? (a) <a> (b) <p> (c) <link> (d) <img>
  11. 11.True or false: HTML on its own can count button clicks. (a) False (b) True
  12. 12.True or false: <p> has a closing tag. (a) True (b) False
  13. 13.True or false: HTML on its own can pick a random number. (a) True (b) False
  14. 14.🌐 Which one stores a website’s files? (a) a code editor (b) a web browser (c) a web server
  15. 15.📋 Which list tag shows 1, 2, 3 numbers? (a) <ul> (b) <ol> (c) <li>
  16. 16.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) opens it in a new tab (d) makes it blank
  17. 17.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>My best friend</p>
    <p>Our school trip</p>
    <h2>My pets</h2>
    <h3>Cricket is fun.</h3>
  18. 18.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <hr> (d) <ol>
  19. 19.Which of these goes in the head? (a) <ul> (b) <title> (c) <p> (d) <table>
  20. 20.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) height (c) src (d) alt
  21. 21.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="250">
    (a) width (b) map.png (c) Birthday cake (d) Map of India
  22. 22.📄 Can HTML on its own make tables? (a) No (b) Yes
  23. 23.🔠 Are headings shown in bold by default? (a) Yes (b) No
  24. 24.🔠 Which heading shows the SMALLEST text: <h5>, <h6>, <h1> or <h3>? (a) <h1> (b) <h5> (c) <h3> (d) <h6>
  25. 25.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
  26. 26.True or false: <li> is an ordered list. (a) True (b) False
  27. 27.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Sky is blue<br>Birds sing<br>Stars shine<br>Roses are red</p>
  28. 28.🔍 Which line is missing its closing tag?
    line 1: <h3>Cricket is fun.</h3>
    line 2: <h1>Good morning!
    line 3: <u>Fun facts</u>
    (a) line 2 (b) line 3 (c) line 1
  29. 29.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) element (c) editor (d) address
  30. 30.True or false: HTML on its own cannot make links to pages. (a) True (b) False
  31. 31.True or false: <br> is an empty tag. (a) True (b) False
  32. 32.📋 Which list tag is an unordered list? (a) <ol> (b) <li> (c) <ul>
  33. 33.🔍 One closing tag is missing. Which one?
    <p>Cricket is fun.</p>
    <strong>My pets</strong>
    <small>I love mangoes.
    (a) </strong> (b) </p> (c) </small> (d) </h2>
  34. 34.📄 Where does the text of <title> appear? (a) nowhere (b) in a big heading (c) on the browser tab (d) at the bottom
  35. 35.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Easy snacks (b) I like to read. (c) index.html (d) Space Facts
  36. 36.Which of these is a closing tag? (a) <li> (b) <h1> (c) </h1> (d) <title>
  37. 37.Which of these is true of a web browser? (a) is where we type code (b) has an address bar (c) shows line numbers (d) answers page requests
  38. 38.True or false: <ol> goes inside ul or ol. (a) True (b) False
  39. 39.📝 What does <hr> draw? (a) a table (b) a line across the page (c) a link (d) a picture
  40. 40.💬 Which text will NOT show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>My pets</p>
    <p>Our school trip</p>
    <p>Rain today</p>
    (a) Rain today (b) Our school trip (c) I love mangoes. (d) My pets

Answer key

  1. 4
  2. 4
  3. 1
  4. <h1>
  5. a slash /
  6. Language
  7. My Hobbies
  8. in a new tab
  9. Play games
  10. <a>
  11. False
  12. True
  13. False
  14. a web server
  15. <ol>
  16. opens it in a new tab
  17. 3
  18. <ol>
  19. <title>
  20. alt
  21. Map of India
  22. Yes
  23. Yes
  24. <h6>
  25. Yes
  26. False
  27. 5
  28. line 2
  29. element
  30. False
  31. True
  32. <ul>
  33. </small>
  34. on the browser tab
  35. Space Facts
  36. </h1>
  37. has an address bar
  38. False
  39. a line across the page
  40. I love mangoes.

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