← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 58 · 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.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) Easy snacks (b) My Hobbies (c) We won by 5 runs. (d) index.html
  2. 2.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ol> (c) <ul>
  3. 3.📝 What does <p> make? (a) a link (b) a paragraph (c) a picture (d) a table
  4. 4.🔍 Which line is missing its closing tag?
    line 1: <small>The red kite
    line 2: <h2>My best friend</h2>
    line 3: <u>My pets</u>
    (a) line 1 (b) line 3 (c) line 2
  5. 5.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h1> or <h4>? (a) <h1> (b) <h5> (c) <h4> (d) <h2>
  6. 6.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>My best friend</p>
    <h3>My pets</h3>
    <p>Our school trip</p>
  7. 7.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  8. 8.📋 How many items does this list show?
    <ol>
      <li>Grapes</li>
      <li>Banana</li>
      <li>Papaya</li>
    </ol>
  9. 9.🔍 Which is the odd one out? (a) stores a website’s files (b) answers page requests (c) hosts websites online (d) shows pages from the web
  10. 10.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) makes it blank (d) opens it in a new tab
  11. 11.Which of these is a closing tag? (a) <title> (b) <b> (c) <li> (d) </p>
  12. 12.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  13. 13.🔗 Which words do you click on?
    <a href="maths.html">Play games</a>
    (a) maths.html (b) About us (c) href (d) Play games
  14. 14.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
  15. 15.True or false: <ol> goes inside ul or ol. (a) True (b) False
  16. 16.📄 Where does the text of <title> appear? (a) nowhere (b) on the browser tab (c) in a big heading (d) at the bottom
  17. 17.🔗 Which words do you click on?
    <a href="quiz.html">School news</a>
    (a) quiz.html (b) School news (c) Take the quiz (d) href
  18. 18.🔗 Which address opens when you click this link?
    <a href="contact.html">Maths fun</a>
    (a) maths.html (b) Maths fun (c) contact.html (d) https://example.com
  19. 19.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
  20. 20.🔍 One closing tag is missing. Which one?
    <strong>I love mangoes.</strong>
    <h2>Cricket is fun.
    <small>The red kite</small>
    (a) </h2> (b) </small> (c) </strong> (d) </b>
  21. 21.📋 Which list tag shows 1, 2, 3 numbers? (a) <ul> (b) <ol> (c) <li>
  22. 22.🔍 One closing tag is missing. Which one?
    <small>I love mangoes.</small>
    <h3>Hello, world!
    <h1>My pets</h1>
    (a) </h1> (b) </small> (c) </h3> (d) </strong>
  23. 23.📋 How many items does this list show?
    <ol>
      <li>Orange</li>
      <li>Jamun</li>
    </ol>
  24. 24.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  25. 25.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="350">
    (a) map.png (b) kite.png (c) cake.jpg (d) A red kite
  26. 26.📋 Does this list show bullets or numbers?
    <ul>
      <li>Mango</li>
      <li>Guava</li>
    </ul>
    (a) numbers (b) bullets
  27. 27.Which of these goes in the head? (a) <a> (b) <p> (c) <ul> (d) <title>
  28. 28.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  29. 29.📋 What number does the browser show next to “Banana”?
    <ol start="9">
      <li>Grapes</li>
      <li>Orange</li>
      <li>Guava</li>
      <li>Banana</li>
    </ol>
  30. 30.📋 Does this list show bullets or numbers?
    <ol>
      <li>Mango</li>
      <li>Jamun</li>
    </ol>
    (a) bullets (b) numbers
  31. 31.🔗 Which address opens when you click this link?
    <a href="art.html">Art corner</a>
    (a) news.html (b) quiz.html (c) art.html (d) Art corner
  32. 32.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
  33. 33.Which of these is an empty tag? (a) <li> (b) <b> (c) <ul> (d) <br>
  34. 34.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  35. 35.True or false: <li> lists things in any order. (a) False (b) True
  36. 36.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a hash # (c) a dollar $ (d) a slash /
  37. 37.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as 5 spaces (c) as a new line (d) as one space
  38. 38.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>Hello, world!</p>
    <p>My best friend</p>
    <!-- <p>Our school trip</p> -->
    (a) Good morning! (b) Hello, world! (c) My best friend (d) Our school trip
  39. 39.Which of these is true of a web browser? (a) is where we type code (b) sends pages over the net (c) shows pages from the web (d) hosts websites online
  40. 40.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h5> or <h2>? (a) <h2> (b) <h1> (c) <h5> (d) <h4>

Answer key

  1. My Hobbies
  2. <li>
  3. a paragraph
  4. line 1
  5. <h1>
  6. 2
  7. Yes
  8. 3
  9. shows pages from the web
  10. opens it in a new tab
  11. </p>
  12. No
  13. Play games
  14. in the body
  15. False
  16. on the browser tab
  17. School news
  18. contact.html
  19. in the head
  20. </h2>
  21. <ol>
  22. </h3>
  23. 2
  24. has a closing tag
  25. kite.png
  26. bullets
  27. <title>
  28. an opening tag
  29. 12
  30. numbers
  31. art.html
  32. in the head
  33. <br>
  34. in the head
  35. False
  36. a slash /
  37. as one space
  38. Our school trip
  39. shows pages from the web
  40. <h5>

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