← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 332 · 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.🔢 In a basic web page file, which comes first: “<body>” or “</head>”? (a) <body> (b) </head>
  2. 2.📛 In <a href="x.html">, what is href? (a) an attribute (b) an element name (c) a comment (d) a closing tag
  3. 3.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h1> or <h5>? (a) <h1> (b) <h3> (c) <h4> (d) <h5>
  4. 4.🏷️ Which is the closing tag for <h2>? (a) <\h2> (b) <h2/> (c) <h2> (d) </h2>
  5. 5.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h4> or <h3>? (a) <h2> (b) <h4> (c) <h3> (d) <h6>
  6. 6.🔤 In “HTML”, what does the M stand for? (a) Machine (b) Markup (c) Mouse (d) Modern
  7. 7.True or false: in <img>, alt is read by screen readers. (a) True (b) False
  8. 8.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>I love mangoes.</p>
    <p>Our school trip</p>
  9. 9.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>My pets</p>
    <!-- <p>Rain today</p> -->
    <!-- <p>Fun facts</p> -->
  10. 10.🔗 Which words do you click on?
    <a href="https://example.com">Visit the site</a>
    (a) href (b) Maths fun (c) https://example.com (d) Visit the site
  11. 11.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a slash / (c) a dot . (d) a dollar $
  12. 12.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>Hello, world!</p>
    <h2>The red kite</h2>
  13. 13.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  14. 14.🏷️ Is </h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  15. 15.🖼️ Which attribute of <img> describes the picture? (a) width (b) height (c) src (d) alt
  16. 16.Which of these is true of a web server? (a) turns HTML into a page (b) has an address bar (c) shows pages from the web (d) hosts websites online
  17. 17.Which of these is a closing tag? (a) <p> (b) <li> (c) <h1> (d) </h1>
  18. 18.🔤 In “HTML”, what do the letters HT stand for? (a) Hot Tags (b) High Tech (c) Home Text (d) HyperText
  19. 19.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="50">
    (a) fort.jpg (b) width (c) An old fort (d) A tiger asleep
  20. 20.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="200">
  21. 21.🔠 Which heading shows the SMALLEST text: <h6>, <h4>, <h5> or <h1>? (a) <h4> (b) <h6> (c) <h5> (d) <h1>
  22. 22.📋 Which list suits a shopping list in any order? (a) <br> (b) <ul> (c) <hr> (d) <ol>
  23. 23.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h1> or <h6>? (a) <h6> (b) <h1> (c) <h4> (d) <h5>
  24. 24.📋 Does this list show bullets or numbers?
    <ol>
      <li>Banana</li>
      <li>Litchi</li>
      <li>Papaya</li>
    </ol>
    (a) bullets (b) numbers
  25. 25.📋 Which tag goes around each item of a list? (a) <ol> (b) <ul> (c) <p> (d) <li>
  26. 26.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) width (c) alt (d) height
  27. 27.🔗 Which address opens when you click this link?
    <a href="maths.html">Play games</a>
    (a) art.html (b) news.html (c) Play games (d) maths.html
  28. 28.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Rivers flow<br>Sky is blue<br>Roses are red<br>Kites fly high</p>
  29. 29.🔍 Which is the odd one out? (a) saves our .html files (b) sends pages over the net (c) colours code to help us (d) is where we type code
  30. 30.🔗 Which attribute holds the address of a link? (a) src (b) href (c) id (d) alt
  31. 31.🔗 Which words do you click on?
    <a href="contact.html">Take the quiz</a>
    (a) contact.html (b) href (c) Play games (d) Take the quiz
  32. 32.💬 Why do coders write comments? (a) to show pictures (b) to make links (c) to leave notes (d) to add colour
  33. 33.📄 Where does the text of <title> appear? (a) on the browser tab (b) at the bottom (c) in a big heading (d) nowhere
  34. 34.🔍 Which is the odd one out? (a) shows pages from the web (b) shows line numbers (c) turns HTML into a page (d) has an address bar
  35. 35.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) makes it blank (d) opens it in a new tab
  36. 36.🔍 Which is the odd one out? (a) opens web pages for us (b) is where we type code (c) saves our .html files (d) colours code to help us
  37. 37.💬 How does an HTML comment start? (a) # (b) // (c) <!-- (d) /*
  38. 38.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <br> (d) <ol>
  39. 39.True or false: <p> goes in the body. (a) True (b) False
  40. 40.📄 Which part holds everything you see on the page? (a) the body (b) the head (c) the doctype (d) the title

Answer key

  1. </head>
  2. an attribute
  3. <h5>
  4. </h2>
  5. <h2>
  6. Markup
  7. True
  8. 1
  9. 1
  10. Visit the site
  11. a slash /
  12. 2
  13. a closing tag
  14. a closing tag
  15. alt
  16. hosts websites online
  17. </h1>
  18. HyperText
  19. An old fort
  20. 200
  21. <h6>
  22. <ul>
  23. <h6>
  24. numbers
  25. <li>
  26. alt
  27. maths.html
  28. 5
  29. sends pages over the net
  30. href
  31. Take the quiz
  32. to leave notes
  33. on the browser tab
  34. shows line numbers
  35. opens it in a new tab
  36. opens web pages for us
  37. <!--
  38. <ol>
  39. True
  40. the body

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