← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 680 · 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.💬 Why do coders write comments? (a) to show pictures (b) to add colour (c) to make links (d) to leave notes
  2. 2.True or false: <ul> lists steps in order. (a) False (b) True
  3. 3.True or false: <h1> goes in the body. (a) False (b) True
  4. 4.🔍 One closing tag is missing. Which one?
    <p>Our school trip</p>
    <u>My best friend</u>
    <h2>Hello, world!
    (a) </p> (b) </small> (c) </h2> (d) </u>
  5. 5.📋 Which list tag shows bullet points? (a) <li> (b) <ol> (c) <ul>
  6. 6.🔢 In a basic web page file, which comes first: “</body>” or “<html>”? (a) </body> (b) <html>
  7. 7.Which of these is a closing tag? (a) <b> (b) <li> (c) </li> (d) <title>
  8. 8.Which of these is true of a web server? (a) turns HTML into a page (b) stores a website’s files (c) opens web pages for us (d) is where we type code
  9. 9.🖼️ Which attribute of <img> sets how tall it is? (a) height (b) width (c) alt (d) src
  10. 10.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) </body> (c) <body> (d) <head>
  11. 11.📋 How many items does this list show?
    <ol>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Grapes</li>
    </ol>
  12. 12.📋 Which list tag lists things in any order? (a) <li> (b) <ul> (c) <ol>
  13. 13.True or false: a web server hosts websites online. (a) False (b) True
  14. 14.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Cricket is fun.</p>
    <h2>Cricket is fun.</h2>
    <p>My best friend</p>
    <h4>Fun facts</h4>
  15. 15.True or false: <ul> goes inside ul or ol. (a) True (b) False
  16. 16.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h2> or <h3>? (a) <h4> (b) <h2> (c) <h1> (d) <h3>
  17. 17.Which of these is an opening tag? (a) </p> (b) <body> (c) </li> (d) </title>
  18. 18.📄 What is the big heading shown on 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) Space Facts (b) I like to read. (c) body (d) Easy snacks
  19. 19.💬 How does an HTML comment start? (a) # (b) /* (c) // (d) <!--
  20. 20.📝 Does <input> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  21. 21.🔗 Which address opens when you click this link?
    <a href="games.html">Maths fun</a>
    (a) Maths fun (b) contact.html (c) games.html (d) about.html
  22. 22.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <h2>Fun facts</h2>
    <h2>Cricket is fun.</h2>
    <h2>Hello, world!</h2>
  23. 23.Which of these is a closing tag? (a) <li> (b) <p> (c) </h1> (d) <body>
  24. 24.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  25. 25.Which of these is a closing tag? (a) </title> (b) <b> (c) <p> (d) <title>
  26. 26.🔠 How many heading levels does HTML have? (a) 10 (b) 4 (c) 3 (d) 6
  27. 27.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="250">
    (a) bus.jpg (b) dog.jpg (c) A happy dog (d) moon.png
  28. 28.🔗 Which words do you click on?
    <a href="about.html">Visit the site</a>
    (a) Visit the site (b) Maths fun (c) href (d) about.html
  29. 29.📋 What number does the browser show next to “Banana”?
    <ol start="6">
      <li>Guava</li>
      <li>Orange</li>
      <li>Banana</li>
    </ol>
  30. 30.🌐 Which one is where we type code? (a) a code editor (b) a web server (c) a web browser
  31. 31.📝 What does <br> do? (a) adds a picture (b) makes text bold (c) makes a list (d) starts a new line
  32. 32.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <!-- <p>My pets</p> -->
    <p>The red kite</p>
    <p>My best friend</p>
  33. 33.🔗 Which words do you click on?
    <a href="maths.html">About us</a>
    (a) href (b) maths.html (c) About us (d) Contact us
  34. 34.Which of these goes in the head? (a) <h1> (b) <p> (c) <table> (d) <meta charset="utf-8">
  35. 35.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h4> or <h3>? (a) <h5> (b) <h1> (c) <h4> (d) <h3>
  36. 36.🔗 Which address opens when you click this link?
    <a href="maths.html">Play games</a>
    (a) art.html (b) maths.html (c) news.html (d) Play games
  37. 37.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>Our school trip</p>
    <p>Rain today</p>
    <!-- <p>Hello, world!</p> -->
    <!-- <p>My best friend</p> -->
  38. 38.📛 In <a href="x.html">, what is href? (a) an element name (b) an attribute (c) a closing tag (d) a comment
  39. 39.📋 Which tag goes around each item of a list? (a) <li> (b) <ul> (c) <ol> (d) <p>
  40. 40.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <h2>I love mangoes.</h2>
    <h2>Good morning!</h2>

Answer key

  1. to leave notes
  2. False
  3. True
  4. </h2>
  5. <ul>
  6. <html>
  7. </li>
  8. stores a website’s files
  9. height
  10. <!DOCTYPE html>
  11. 4
  12. <ul>
  13. True
  14. 3
  15. False
  16. <h4>
  17. <body>
  18. Easy snacks
  19. <!--
  20. an empty tag
  21. games.html
  22. 1
  23. </h1>
  24. an opening tag
  25. </title>
  26. 6
  27. dog.jpg
  28. Visit the site
  29. 8
  30. a code editor
  31. starts a new line
  32. 3
  33. About us
  34. <meta charset="utf-8">
  35. <h5>
  36. maths.html
  37. 2
  38. an attribute
  39. <li>
  40. 1

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