← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 862 · 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 <h2>? (a) <\h2> (b) <h2> (c) <h2/> (d) </h2>
  2. 2.🔍 Which line is missing its closing tag?
    line 1: <strong>Our school trip</strong>
    line 2: <small>Rain today</small>
    line 3: <h1>I love mangoes.
    (a) line 1 (b) line 3 (c) line 2
  3. 3.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h3> or <h5>? (a) <h3> (b) <h6> (c) <h1> (d) <h5>
  4. 4.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  5. 5.🔗 Where does this link open?
    <a href="art.html" target="_blank">Visit the site</a>
    (a) in a new tab (b) in the same tab
  6. 6.Which of these is an opening tag? (a) </title> (b) </h1> (c) </body> (d) <li>
  7. 7.🔤 In “HTML”, what do the letters HT stand for? (a) Home Text (b) HyperText (c) Hot Tags (d) High Tech
  8. 8.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) alt (c) width (d) src
  9. 9.🏷️ Is </p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  10. 10.🔗 Which address opens when you click this link?
    <a href="games.html">Art corner</a>
    (a) Art corner (b) about.html (c) contact.html (d) games.html
  11. 11.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
    <h2>Fun facts</h2>
    <h2>Good morning!</h2>
    <p>My best friend</p>
  12. 12.Which of these goes in the body? (a) <style> (b) <title> (c) <link rel="stylesheet"> (d) <h1>
  13. 13.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h3> or <h4>? (a) <h4> (b) <h1> (c) <h6> (d) <h3>
  14. 14.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <html> (d) <head>
  15. 15.🔗 Which address opens when you click this link?
    <a href="quiz.html">Take the quiz</a>
    (a) about.html (b) games.html (c) Take the quiz (d) quiz.html
  16. 16.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <!-- <p>Hello, world!</p> -->
    <p>My best friend</p>
    <!-- <p>Rain today</p> -->
    <p>Our school trip</p>
  17. 17.🔍 Which line is missing its closing tag?
    line 1: <p>Fun facts</p>
    line 2: <i>Hello, world!
    line 3: <u>Our school trip</u>
    (a) line 1 (b) line 3 (c) line 2
  18. 18.📝 What does <br> do? (a) adds a picture (b) makes a list (c) starts a new line (d) makes text bold
  19. 19.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) alt (c) src (d) width
  20. 20.🏷️ Which is the closing tag for <small>? (a) <small> (b) </small> (c) <\small> (d) <small/>
  21. 21.🔍 One closing tag is missing. Which one?
    <h1>My best friend</h1>
    <u>Cricket is fun.</u>
    <h3>Hello, world!
    (a) </b> (b) </u> (c) </h1> (d) </h3>
  22. 22.Which of these is true of a web browser? (a) hosts websites online (b) turns HTML into a page (c) stores a website’s files (d) sends pages over the net
  23. 23.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a dollar $ (c) a dot . (d) a hash #
  24. 24.📋 Does this list show bullets or numbers?
    <ol>
      <li>Mango</li>
      <li>Jamun</li>
    </ol>
    (a) numbers (b) bullets
  25. 25.🔗 Which words do you click on?
    <a href="quiz.html">Take the quiz</a>
    (a) quiz.html (b) Play games (c) href (d) Take the quiz
  26. 26.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="100">
    (a) A red kite (b) cake.jpg (c) map.png (d) kite.png
  27. 27.🔍 One closing tag is missing. Which one?
    <h1>Rain today</h1>
    <h2>My pets</h2>
    <h3>My best friend
    (a) </h3> (b) </u> (c) </h1> (d) </h2>
  28. 28.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h5> or <h2>? (a) <h5> (b) <h6> (c) <h2> (d) <h1>
  29. 29.Which of these goes in the head? (a) <a> (b) <ul> (c) <title> (d) <p>
  30. 30.📄 Can HTML on its own count button clicks? (a) No (b) Yes
  31. 31.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it bold (c) hides the link (d) makes it blank
  32. 32.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ul> (c) <br> (d) <ol>
  33. 33.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h6> or <h5>? (a) <h4> (b) <h5> (c) <h3> (d) <h6>
  34. 34.True or false: HTML on its own cannot show paragraphs. (a) True (b) False
  35. 35.Which of these is an empty tag? (a) <b> (b) <li> (c) <img> (d) <title>
  36. 36.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="300">
    (a) An old fort (b) width (c) bus.jpg (d) Our school bus
  37. 37.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>Fun facts</p>
    <p>Rain today</p>
    <!-- <p>My pets</p> -->
    <p>Our school trip</p>
  38. 38.🔗 Which words do you click on?
    <a href="about.html">Take the quiz</a>
    (a) href (b) Play games (c) Take the quiz (d) about.html
  39. 39.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
  40. 40.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <p>Rain today</p>
    <!-- <p>Cricket is fun.</p> -->

Answer key

  1. </h2>
  2. line 3
  3. <h6>
  4. Yes
  5. in a new tab
  6. <li>
  7. HyperText
  8. alt
  9. a closing tag
  10. games.html
  11. 3
  12. <h1>
  13. <h1>
  14. <!DOCTYPE html>
  15. quiz.html
  16. 3
  17. line 2
  18. starts a new line
  19. alt
  20. </small>
  21. </h3>
  22. turns HTML into a page
  23. a slash /
  24. numbers
  25. Take the quiz
  26. kite.png
  27. </h3>
  28. <h1>
  29. <title>
  30. No
  31. opens it in a new tab
  32. <ul>
  33. <h6>
  34. False
  35. <img>
  36. Our school bus
  37. 3
  38. Take the quiz
  39. in the body
  40. 2

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