← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 797 · 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 “<!DOCTYPE html>”? (a) <body> (b) <!DOCTYPE html>
  2. 2.🏷️ Which is the closing tag for <b>? (a) <\b> (b) </b> (c) <b> (d) <b/>
  3. 3.🔠 Are headings shown in bold by default? (a) No (b) Yes
  4. 4.🔗 Which address opens when you click this link?
    <a href="https://example.com">School news</a>
    (a) https://example.com (b) School news (c) maths.html (d) art.html
  5. 5.🔗 What does HyperText mean? (a) text in colour (b) very big text (c) text with links (d) secret text
  6. 6.📝 What does <p> make? (a) a link (b) a paragraph (c) a table (d) a picture
  7. 7.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Kites fly high<br>Sky is blue</p>
  8. 8.Which of these is an opening tag? (a) <p> (b) </p> (c) </b> (d) </h1>
  9. 9.Which of these is an opening tag? (a) </b> (b) </body> (c) <h1> (d) </p>
  10. 10.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 10 (c) 1 (d) 6
  11. 11.🖼️ Which attribute of <img> names the picture file? (a) width (b) height (c) alt (d) src
  12. 12.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  13. 13.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 3 (d) 4
  14. 14.🧱 HTML gives a web page its ___. (a) speed (b) colours (c) structure (d) sound
  15. 15.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Match report (b) Riya’s Recipes (c) Mars is red. (d) body
  16. 16.True or false: a web server is where we type code. (a) True (b) False
  17. 17.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Riya’s Recipes (b) Here is my best one. (c) Match report (d) index.html
  18. 18.True or false: a code editor answers page requests. (a) False (b) True
  19. 19.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) height (c) alt (d) width
  20. 20.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>My pets</p>
    <h2>Our school trip</h2>
  21. 21.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <p>I love mangoes.</p>
    <!-- <p>Rain today</p> -->
    <p>Our school trip</p>
    <p>Good morning!</p>
  22. 22.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h4> or <h3>? (a) <h4> (b) <h2> (c) <h6> (d) <h3>
  23. 23.🌐 Which one sends pages over the net? (a) a web browser (b) a code editor (c) a web server
  24. 24.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="100">
    (a) Map of India (b) map.png (c) Birthday cake (d) width
  25. 25.🔗 Where does this link open?
    <a href="news.html">About us</a>
    (a) in a new tab (b) in the same tab
  26. 26.🔤 In “HTML”, what do the letters HT stand for? (a) Home Text (b) Hot Tags (c) HyperText (d) High Tech
  27. 27.📄 Where does the text of <title> appear? (a) nowhere (b) in a big heading (c) at the bottom (d) on the browser tab
  28. 28.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h1> or <h5>? (a) <h5> (b) <h6> (c) <h1> (d) <h3>
  29. 29.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h5> or <h2>? (a) <h4> (b) <h5> (c) <h3> (d) <h2>
  30. 30.True or false: in <img>, src sets how tall it is. (a) True (b) False
  31. 31.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  32. 32.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ol> (c) <br> (d) <ul>
  33. 33.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  34. 34.🔗 Which address opens when you click this link?
    <a href="about.html">Take the quiz</a>
    (a) https://example.com (b) contact.html (c) about.html (d) Take the quiz
  35. 35.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <p>Good morning!</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>I love mangoes.</p>
  36. 36.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h6> or <h5>? (a) <h1> (b) <h6> (c) <h5> (d) <h2>
  37. 37.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
  38. 38.📋 What number does the browser show next to “Orange”?
    <ol>
      <li>Mango</li>
      <li>Orange</li>
      <li>Litchi</li>
      <li>Guava</li>
    </ol>
  39. 39.Which of these has a closing tag? (a) <meta> (b) <h1> (c) <img> (d) <br>
  40. 40.📄 Can HTML on its own show paragraphs? (a) Yes (b) No

Answer key

  1. <!DOCTYPE html>
  2. </b>
  3. Yes
  4. https://example.com
  5. text with links
  6. a paragraph
  7. 3
  8. <p>
  9. <h1>
  10. 1
  11. src
  12. in the head
  13. 6
  14. structure
  15. Match report
  16. False
  17. Riya’s Recipes
  18. False
  19. alt
  20. 2
  21. 4
  22. <h6>
  23. a web server
  24. Map of India
  25. in the same tab
  26. HyperText
  27. on the browser tab
  28. <h6>
  29. <h5>
  30. False
  31. has a closing tag
  32. <ol>
  33. No
  34. about.html
  35. 3
  36. <h1>
  37. in the body
  38. 2
  39. <h1>
  40. Yes

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