← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 799 · 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.🏷️ Which is the closing tag for <strong>? (a) <strong> (b) <strong/> (c) <\strong> (d) </strong>
  2. 2.🔠 How many heading levels does HTML have? (a) 6 (b) 4 (c) 10 (d) 3
  3. 3.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Kites fly high<br>Sky is blue<br>Roses are red<br>Rivers flow</p>
  4. 4.Which of these has a closing tag? (a) <hr> (b) <ul> (c) <br> (d) <input>
  5. 5.💬 Why do coders write comments? (a) to show pictures (b) to add colour (c) to make links (d) to leave notes
  6. 6.📋 Does this list show bullets or numbers?
    <ol>
      <li>Orange</li>
      <li>Guava</li>
    </ol>
    (a) bullets (b) numbers
  7. 7.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <p>Rain today</p>
    <!-- <p>Fun facts</p> -->
    <p>Hello, world!</p>
  8. 8.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <p>My pets</p>
    <p>My pets</p>
    <p>I love mangoes.</p>
  9. 9.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="300">
    (a) bus.jpg (b) dog.jpg (c) moon.png (d) A happy dog
  10. 10.True or false: <hr> has a closing tag. (a) False (b) True
  11. 11.Which of these has a closing tag? (a) <meta> (b) <input> (c) <h1> (d) <img>
  12. 12.🏷️ Which is the closing tag for <p>? (a) <p> (b) </p> (c) <p/> (d) <\p>
  13. 13.🔗 Which words do you click on?
    <a href="about.html">Take the quiz</a>
    (a) about.html (b) Take the quiz (c) href (d) Play games
  14. 14.📋 How many items does this list show?
    <ul>
      <li>Orange</li>
      <li>Guava</li>
      <li>Banana</li>
      <li>Grapes</li>
      <li>Mango</li>
      <li>Papaya</li>
    </ul>
  15. 15.🔗 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
  16. 16.True or false: <ol> is one item of a list. (a) True (b) False
  17. 17.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a hash # (c) a dot . (d) a slash /
  18. 18.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
  19. 19.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>Rain today</p>
    <h2>Cricket is fun.</h2>
    <p>My pets</p>
  20. 20.🔗 Which words do you click on?
    <a href="quiz.html">Art corner</a>
    (a) School news (b) quiz.html (c) Art corner (d) href
  21. 21.📄 Which part holds everything you see on the page? (a) the doctype (b) the head (c) the title (d) the body
  22. 22.True or false: <li> is one item of a list. (a) False (b) True
  23. 23.🔢 In a basic web page file, which comes first: “<head>” or “<body>”? (a) <head> (b) <body>
  24. 24.🔍 Which line is missing its closing tag?
    line 1: <small>Rain today
    line 2: <u>My pets</u>
    line 3: <strong>My best friend</strong>
    (a) line 3 (b) line 2 (c) line 1
  25. 25.Which of these is true of a web server? (a) turns HTML into a page (b) hosts websites online (c) has an address bar (d) is where we type code
  26. 26.🔢 In a basic web page file, which comes FIRST? (a) <body> (b) <head> (c) <!DOCTYPE html> (d) </body>
  27. 27.True or false: in <img>, alt is read by screen readers. (a) False (b) True
  28. 28.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h2>Fun facts</h2>
    <h2>Rain today</h2>
    <h2>My best friend</h2>
  29. 29.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as one space (c) as 5 spaces (d) as a dot
  30. 30.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) height (c) alt (d) src
  31. 31.📝 Does <b> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  32. 32.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h3> or <h1>? (a) <h3> (b) <h1> (c) <h5> (d) <h4>
  33. 33.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Fun facts</p> -->
    <p>Rain today</p>
    <!-- <p>Cricket is fun.</p> -->
  34. 34.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h1> or <h3>? (a) <h2> (b) <h6> (c) <h1> (d) <h3>
  35. 35.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  36. 36.🔍 One closing tag is missing. Which one?
    <h3>Cricket is fun.
    <p>Hello, world!</p>
    <b>Good morning!</b>
    (a) </b> (b) </p> (c) </em> (d) </h3>
  37. 37.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <h2>My best friend</h2>
    <p>Cricket is fun.</p>
    <h2>I love mangoes.</h2>
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
  38. 38.True or false: <table> goes in the body. (a) True (b) False
  39. 39.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <h1> (c) <br> (d) <p>
  40. 40.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h3> or <h1>? (a) <h6> (b) <h5> (c) <h3> (d) <h1>

Answer key

  1. </strong>
  2. 6
  3. 5
  4. <ul>
  5. to leave notes
  6. numbers
  7. 3
  8. 4
  9. dog.jpg
  10. False
  11. <h1>
  12. </p>
  13. Take the quiz
  14. 6
  15. opens it in a new tab
  16. False
  17. a slash /
  18. in the body
  19. 3
  20. Art corner
  21. the body
  22. True
  23. <head>
  24. line 1
  25. hosts websites online
  26. <!DOCTYPE html>
  27. True
  28. 4
  29. as one space
  30. width
  31. has a closing tag
  32. <h1>
  33. 2
  34. <h6>
  35. has a closing tag
  36. </h3>
  37. 4
  38. True
  39. <h1>
  40. <h1>

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