← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 540 · 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 pets</p>
    <p>Cricket is fun.</p>
    <p>Our school trip</p>
    <p>Fun facts</p>
    <p>The red kite</p>
    <p>Rain today</p>
  2. 2.🔗 Which words do you click on?
    <a href="about.html">About us</a>
    (a) about.html (b) Contact us (c) About us (d) href
  3. 3.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
  4. 4.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="150">
    (a) width (b) A red kite (c) tiger.jpg (d) A tiger asleep
  5. 5.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>The red kite</p>
    <!-- <p>My best friend</p> -->
    <p>Hello, world!</p>
    <p>Fun facts</p>
  6. 6.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
  7. 7.💬 Why do coders write comments? (a) to make links (b) to show pictures (c) to leave notes (d) to add colour
  8. 8.📋 Which list tag is one item of a list? (a) <ul> (b) <li> (c) <ol>
  9. 9.📋 What number does the browser show next to “Grapes”?
    <ol start="8">
      <li>Banana</li>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Guava</li>
    </ol>
  10. 10.True or false: <img> goes in the head. (a) True (b) False
  11. 11.🔗 Which address opens when you click this link?
    <a href="quiz.html">School news</a>
    (a) games.html (b) about.html (c) School news (d) quiz.html
  12. 12.🔗 Which words do you click on?
    <a href="maths.html">Take the quiz</a>
    (a) maths.html (b) href (c) Play games (d) Take the quiz
  13. 13.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h4> or <h5>? (a) <h4> (b) <h2> (c) <h5> (d) <h1>
  14. 14.Which of these is an opening tag? (a) </body> (b) <body> (c) </li> (d) </h1>
  15. 15.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Grapes</li>
      <li>Orange</li>
      <li>Guava</li>
      <li>Banana</li>
      <li>Litchi</li>
    </ul>
  16. 16.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="200">
    (a) moon.png (b) The full moon (c) Our school bus (d) width
  17. 17.🌐 Which one colours code to help us? (a) a web server (b) a code editor (c) a web browser
  18. 18.Which of these is an opening tag? (a) </li> (b) </p> (c) </b> (d) <p>
  19. 19.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a hash # (c) a dot . (d) a slash /
  20. 20.📋 Which list tag lists things in any order? (a) <li> (b) <ol> (c) <ul>
  21. 21.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <p>I love mangoes.</p>
  22. 22.🔤 In “HTML”, what do the letters HT stand for? (a) High Tech (b) HyperText (c) Hot Tags (d) Home Text
  23. 23.🏷️ Which is the closing tag for <h2>? (a) <h2/> (b) </h2> (c) <\h2> (d) <h2>
  24. 24.Which of these goes in the body? (a) <p> (b) <style> (c) <title> (d) <link rel="stylesheet">
  25. 25.🔗 Which words do you click on?
    <a href="about.html">Visit the site</a>
    (a) href (b) Maths fun (c) about.html (d) Visit the site
  26. 26.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <p>Fun facts</p>
  27. 27.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) element (c) attribute (d) editor
  28. 28.🔗 Which words do you click on?
    <a href="news.html">Art corner</a>
    (a) news.html (b) href (c) School news (d) Art corner
  29. 29.🌐 Which one shows pages from the web? (a) a code editor (b) a web server (c) a web browser
  30. 30.📄 Can HTML on its own keep a high score? (a) No (b) Yes
  31. 31.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h5> or <h4>? (a) <h1> (b) <h4> (c) <h3> (d) <h5>
  32. 32.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  33. 33.🔍 One closing tag is missing. Which one?
    <small>Hello, world!</small>
    <b>Fun facts</b>
    <strong>Our school trip
    (a) </em> (b) </strong> (c) </small> (d) </b>
  34. 34.🔍 Which is the odd one out? (a) shows pages from the web (b) opens web pages for us (c) turns HTML into a page (d) stores a website’s files
  35. 35.🔗 Which words do you click on?
    <a href="contact.html">Maths fun</a>
    (a) Maths fun (b) href (c) contact.html (d) Art corner
  36. 36.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>Cricket is fun.</p>
    <h2>The red kite</h2>
    <h3>Cricket is fun.</h3>
  37. 37.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <!-- <p>My best friend</p> -->
    <!-- <p>Hello, world!</p> -->
    <p>My pets</p>
    <p>I love mangoes.</p>
  38. 38.🔗 Where does this link open?
    <a href="news.html" target="_blank">Art corner</a>
    (a) in the same tab (b) in a new tab
  39. 39.True or false: a code editor has an address bar. (a) False (b) True
  40. 40.📝 What does <br> do? (a) makes text bold (b) makes a list (c) adds a picture (d) starts a new line

Answer key

  1. 6
  2. About us
  3. in the head
  4. A tiger asleep
  5. 3
  6. in the head
  7. to leave notes
  8. <li>
  9. 10
  10. False
  11. quiz.html
  12. Take the quiz
  13. <h5>
  14. <body>
  15. 6
  16. The full moon
  17. a code editor
  18. <p>
  19. a slash /
  20. <ul>
  21. 1
  22. HyperText
  23. </h2>
  24. <p>
  25. Visit the site
  26. 1
  27. element
  28. Art corner
  29. a web browser
  30. No
  31. <h5>
  32. has a closing tag
  33. </strong>
  34. stores a website’s files
  35. Maths fun
  36. 3
  37. 3
  38. in a new tab
  39. False
  40. starts a new line

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