← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 481 · 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.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
  2. 2.True or false: a web browser answers page requests. (a) False (b) True
  3. 3.Which of these is true of a web browser? (a) colours code to help us (b) stores a website’s files (c) saves our .html files (d) opens web pages for us
  4. 4.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h4> or <h2>? (a) <h2> (b) <h3> (c) <h6> (d) <h4>
  5. 5.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="50">
    (a) Our school bus (b) bus.jpg (c) width (d) An old fort
  6. 6.True or false: HTML on its own can make tables. (a) False (b) True
  7. 7.📋 Which list suits a shopping list in any order? (a) <br> (b) <ol> (c) <hr> (d) <ul>
  8. 8.🔍 Which is the odd one out? (a) is where we type code (b) shows line numbers (c) saves our .html files (d) sends pages over the net
  9. 9.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <p>I love mangoes.</p>
    <h3>Our school trip</h3>
    <h2>Our school trip</h2>
  10. 10.Which of these goes in the head? (a) <meta charset="utf-8"> (b) <ul> (c) <img> (d) <p>
  11. 11.Which of these has a closing tag? (a) <input> (b) <br> (c) <img> (d) <h1>
  12. 12.🔗 Where does this link open?
    <a href="games.html">School news</a>
    (a) in the same tab (b) in a new tab
  13. 13.🔍 Which line is missing its closing tag?
    line 1: <h3>I love mangoes.
    line 2: <b>Good morning!</b>
    line 3: <h2>Fun facts</h2>
    (a) line 2 (b) line 1 (c) line 3
  14. 14.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) body (b) I like to read. (c) Planets (d) Cricket Club
  15. 15.True or false: a web server colours code to help us. (a) True (b) False
  16. 16.🔗 Which words do you click on?
    <a href="https://example.com">School news</a>
    (a) href (b) https://example.com (c) Take the quiz (d) School news
  17. 17.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="300">
    (a) Map of India (b) map.png (c) dog.jpg (d) cake.jpg
  18. 18.🔗 Which words do you click on?
    <a href="games.html">School news</a>
    (a) Take the quiz (b) games.html (c) School news (d) href
  19. 19.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <p>Good morning!</p>
    <!-- <p>Hello, world!</p> -->
    <!-- <p>My best friend</p> -->
  20. 20.Which of these is an opening tag? (a) </li> (b) </body> (c) <body> (d) </h1>
  21. 21.📝 What does <hr> draw? (a) a picture (b) a line across the page (c) a table (d) a link
  22. 22.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Fun facts</p>
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
  23. 23.🔍 Which line is missing its closing tag?
    line 1: <p>Our school trip
    line 2: <h3>Fun facts</h3>
    line 3: <b>Good morning!</b>
    (a) line 3 (b) line 2 (c) line 1
  24. 24.🔍 One closing tag is missing. Which one?
    <strong>I love mangoes.</strong>
    <h2>My best friend</h2>
    <h1>Rain today
    (a) </small> (b) </strong> (c) </h2> (d) </h1>
  25. 25.🔠 Which heading shows the BIGGEST text: <h4>, <h3>, <h5> or <h1>? (a) <h4> (b) <h3> (c) <h1> (d) <h5>
  26. 26.🖼️ Which attribute of <img> names the picture file? (a) alt (b) src (c) width (d) height
  27. 27.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h6> or <h2>? (a) <h3> (b) <h2> (c) <h6> (d) <h1>
  28. 28.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    <!-- <p>The red kite</p> -->
    <p>My best friend</p>
    (a) I love mangoes. (b) My best friend (c) The red kite (d) Hello, world!
  29. 29.🔍 One closing tag is missing. Which one?
    <i>I love mangoes.</i>
    <h1>The red kite
    <h3>Fun facts</h3>
    (a) </h3> (b) </h2> (c) </i> (d) </h1>
  30. 30.True or false: HTML on its own can pick a random number. (a) False (b) True
  31. 31.📋 What number does the browser show next to “Guava”?
    <ol>
      <li>Litchi</li>
      <li>Mango</li>
      <li>Guava</li>
      <li>Grapes</li>
      <li>Papaya</li>
      <li>Banana</li>
    </ol>
  32. 32.📋 What number does the browser show next to “Litchi”?
    <ol>
      <li>Grapes</li>
      <li>Litchi</li>
      <li>Banana</li>
    </ol>
  33. 33.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h1> or <h5>? (a) <h2> (b) <h5> (c) <h6> (d) <h1>
  34. 34.📋 Which list tag shows 1, 2, 3 numbers? (a) <ul> (b) <ol> (c) <li>
  35. 35.📝 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
  36. 36.🔗 Which address opens when you click this link?
    <a href="maths.html">Visit the site</a>
    (a) art.html (b) maths.html (c) news.html (d) Visit the site
  37. 37.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to leave notes (d) to show pictures
  38. 38.🔢 In a basic web page file, which comes first: “<head>” or “<body>”? (a) <head> (b) <body>
  39. 39.🔍 Which line is missing its closing tag?
    line 1: <h2>Hello, world!
    line 2: <small>Cricket is fun.</small>
    line 3: <h1>Fun facts</h1>
    (a) line 1 (b) line 2 (c) line 3
  40. 40.📋 Which list tag is an ordered list? (a) <li> (b) <ol> (c) <ul>

Answer key

  1. in the head
  2. False
  3. opens web pages for us
  4. <h2>
  5. Our school bus
  6. True
  7. <ul>
  8. sends pages over the net
  9. 3
  10. <meta charset="utf-8">
  11. <h1>
  12. in the same tab
  13. line 1
  14. Planets
  15. False
  16. School news
  17. map.png
  18. School news
  19. 1
  20. <body>
  21. a line across the page
  22. 4
  23. line 1
  24. </h1>
  25. <h1>
  26. src
  27. <h1>
  28. The red kite
  29. </h1>
  30. False
  31. 3
  32. 2
  33. <h6>
  34. <ol>
  35. as one space
  36. maths.html
  37. to leave notes
  38. <head>
  39. line 1
  40. <ol>

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