← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 360 · 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 a closing tag have that an opening tag does not? (a) a slash / (b) a hash # (c) a dot . (d) a dollar $
  2. 2.True or false: <li> goes inside ul or ol. (a) False (b) True
  3. 3.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Cricket Club (b) index.html (c) Planets (d) Thanks for visiting.
  4. 4.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Kites fly high<br>Roses are red</p>
  5. 5.🔗 Where does this link open?
    <a href="https://example.com" target="_blank">About us</a>
    (a) in a new tab (b) in the same tab
  6. 6.📋 How many items does this list show?
    <ul>
      <li>Guava</li>
      <li>Banana</li>
    </ul>
  7. 7.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <!-- <p>Our school trip</p> -->
    <!-- <p>My pets</p> -->
    <p>The red kite</p>
  8. 8.🔍 Which is the odd one out? (a) answers page requests (b) saves our .html files (c) stores a website’s files (d) sends pages over the net
  9. 9.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  10. 10.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  11. 11.🔍 Which is the odd one out? (a) sends pages over the net (b) stores a website’s files (c) answers page requests (d) opens web pages for us
  12. 12.True or false: in <img>, width shows if the image fails. (a) True (b) False
  13. 13.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
  14. 14.Which of these is a closing tag? (a) </h1> (b) <title> (c) <li> (d) <p>
  15. 15.🔍 One closing tag is missing. Which one?
    <u>Fun facts
    <b>Rain today</b>
    <strong>The red kite</strong>
    (a) </h3> (b) </strong> (c) </u> (d) </b>
  16. 16.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
  17. 17.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Litchi</li>
    </ol>
  18. 18.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Birds sing</p>
  19. 19.True or false: HTML on its own can make a form. (a) True (b) False
  20. 20.📝 What does <p> make? (a) a picture (b) a link (c) a table (d) a paragraph
  21. 21.🏷️ Is </p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  22. 22.🌐 Which one colours code to help us? (a) a code editor (b) a web server (c) a web browser
  23. 23.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h2>My pets</h2>
    <p>The red kite</p>
  24. 24.🏷️ Which is the closing tag for <h1>? (a) </h1> (b) <h1/> (c) <\h1> (d) <h1>
  25. 25.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h6> or <h2>? (a) <h2> (b) <h5> (c) <h1> (d) <h6>
  26. 26.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it blank (c) hides the link (d) makes it bold
  27. 27.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h2> or <h3>? (a) <h2> (b) <h3> (c) <h6> (d) <h1>
  28. 28.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <p>The red kite</p>
    <p>My best friend</p>
  29. 29.Which of these has a closing tag? (a) <img> (b) <p> (c) <hr> (d) <input>
  30. 30.True or false: <ul> lists things in any order. (a) False (b) True
  31. 31.🔗 Which address opens when you click this link?
    <a href="about.html">Maths fun</a>
    (a) https://example.com (b) Maths fun (c) contact.html (d) about.html
  32. 32.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Sky is blue</p>
  33. 33.📋 Which list tag shows bullet points? (a) <li> (b) <ol> (c) <ul>
  34. 34.🔗 Which address opens when you click this link?
    <a href="art.html">Art corner</a>
    (a) art.html (b) Art corner (c) news.html (d) quiz.html
  35. 35.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <p> (d) <link>
  36. 36.Which of these is true of a web server? (a) turns HTML into a page (b) hosts websites online (c) saves our .html files (d) opens web pages for us
  37. 37.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
  38. 38.🔗 Which words do you click on?
    <a href="art.html">Visit the site</a>
    (a) art.html (b) Visit the site (c) Maths fun (d) href
  39. 39.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="50">
    (a) A tiger asleep (b) width (c) fort.jpg (d) An old fort
  40. 40.True or false: <title> goes in the head. (a) False (b) True

Answer key

  1. a slash /
  2. True
  3. Cricket Club
  4. 3
  5. in a new tab
  6. 2
  7. 1
  8. saves our .html files
  9. Yes
  10. No
  11. opens web pages for us
  12. False
  13. 1
  14. </h1>
  15. </u>
  16. in the body
  17. 5
  18. 2
  19. True
  20. a paragraph
  21. a closing tag
  22. a code editor
  23. 2
  24. </h1>
  25. <h1>
  26. opens it in a new tab
  27. <h6>
  28. 2
  29. <p>
  30. True
  31. about.html
  32. 2
  33. <ul>
  34. art.html
  35. <a>
  36. hosts websites online
  37. No
  38. Visit the site
  39. An old fort
  40. True

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