← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 528 · 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 of these goes in the head? (a) <p> (b) <h1> (c) <meta charset="utf-8"> (d) <table>
  2. 2.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="150">
  3. 3.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <p>My pets</p>
    <p>Our school trip</p>
  4. 4.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Planets (b) Mars is red. (c) Cricket Club (d) index.html
  5. 5.🔍 Which is the odd one out? (a) stores a website’s files (b) hosts websites online (c) sends pages over the net (d) shows pages from the web
  6. 6.True or false: in <img>, width tells which image to load. (a) True (b) False
  7. 7.🔗 Which address opens when you click this link?
    <a href="quiz.html">School news</a>
    (a) games.html (b) School news (c) quiz.html (d) about.html
  8. 8.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h2>Hello, world!</h2>
    <p>Our school trip</p>
  9. 9.🔢 In a basic web page file, which comes LAST? (a) <html> (b) </html> (c) </body> (d) </head>
  10. 10.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 10 (c) 3 (d) 1
  11. 11.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <p>Cricket is fun.</p>
    <!-- <p>My best friend</p> -->
  12. 12.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <p>Hello, world!</p>
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Good morning!</p> -->
  13. 13.💬 Does the browser show comments on the page? (a) No (b) Yes
  14. 14.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h5> or <h4>? (a) <h1> (b) <h5> (c) <h4> (d) <h6>
  15. 15.📋 What number does the browser show next to “Mango”?
    <ol start="9">
      <li>Orange</li>
      <li>Jamun</li>
      <li>Mango</li>
    </ol>
  16. 16.Which of these is an opening tag? (a) </title> (b) </body> (c) <h1> (d) </li>
  17. 17.True or false: a code editor shows line numbers. (a) True (b) False
  18. 18.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <p>Our school trip</p>
    <p>I love mangoes.</p>
  19. 19.🔠 Are headings shown in bold by default? (a) No (b) Yes
  20. 20.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h3> or <h5>? (a) <h3> (b) <h1> (c) <h4> (d) <h5>
  21. 21.🔗 Which words do you click on?
    <a href="https://example.com">Art corner</a>
    (a) Art corner (b) href (c) School news (d) https://example.com
  22. 22.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
  23. 23.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h5> or <h6>? (a) <h3> (b) <h4> (c) <h6> (d) <h5>
  24. 24.🔗 Where does this link open?
    <a href="quiz.html">Play games</a>
    (a) in the same tab (b) in a new tab
  25. 25.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h2>Cricket is fun.</h2>
    <h3>My pets</h3>
    <p>My pets</p>
    <h3>The red kite</h3>
  26. 26.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  27. 27.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ul> (c) <ol>
  28. 28.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Art Gallery (b) body (c) Match report (d) Mars is red.
  29. 29.🔍 Which is the odd one out? (a) answers page requests (b) saves our .html files (c) stores a website’s files (d) hosts websites online
  30. 30.🖼️ Which attribute of <img> names the picture file? (a) width (b) height (c) alt (d) src
  31. 31.True or false: <h1> goes in the body. (a) False (b) True
  32. 32.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <ul> (c) <hr> (d) <br>
  33. 33.🔍 One closing tag is missing. Which one?
    <em>My best friend
    <i>Fun facts</i>
    <h1>I love mangoes.</h1>
    (a) </h1> (b) </i> (c) </h3> (d) </em>
  34. 34.True or false: in <img>, alt is read by screen readers. (a) False (b) True
  35. 35.📋 How many items does this list show?
    <ul>
      <li>Papaya</li>
      <li>Mango</li>
      <li>Guava</li>
      <li>Banana</li>
      <li>Jamun</li>
    </ul>
  36. 36.🏷️ HTML marks up text using ___. (a) keys (b) tags (c) pixels (d) wires
  37. 37.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <p>Fun facts</p>
    <!-- <p>I love mangoes.</p> -->
    (a) My best friend (b) I love mangoes. (c) Fun facts
  38. 38.🔍 Which is the odd one out? (a) shows line numbers (b) has an address bar (c) colours code to help us (d) saves our .html files
  39. 39.🏷️ Which is the closing tag for <b>? (a) </b> (b) <b> (c) <b/> (d) <\b>
  40. 40.🔤 In “HTML”, what do the letters HT stand for? (a) Home Text (b) Hot Tags (c) High Tech (d) HyperText

Answer key

  1. <meta charset="utf-8">
  2. 150
  3. 2
  4. Cricket Club
  5. shows pages from the web
  6. False
  7. quiz.html
  8. 2
  9. </html>
  10. 1
  11. 1
  12. 2
  13. No
  14. <h1>
  15. 11
  16. <h1>
  17. True
  18. 2
  19. Yes
  20. <h1>
  21. Art corner
  22. in the head
  23. <h3>
  24. in the same tab
  25. 4
  26. an opening tag
  27. <li>
  28. Match report
  29. saves our .html files
  30. src
  31. True
  32. <ol>
  33. </em>
  34. True
  35. 5
  36. tags
  37. I love mangoes.
  38. has an address bar
  39. </b>
  40. HyperText

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