← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 695 · 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 tag is the least important heading? (a) <h6> (b) <h3> (c) <h1> (d) <p>
  2. 2.🔠 Which tag is used for the main title on a page? (a) <p> (b) <br> (c) <h6> (d) <h1>
  3. 3.Which of these goes in the body? (a) <title> (b) <style> (c) <meta charset="utf-8"> (d) <img>
  4. 4.True or false: HTML on its own can keep a high score. (a) False (b) True
  5. 5.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  6. 6.🔗 What does HyperText mean? (a) text with links (b) text in colour (c) very big text (d) secret text
  7. 7.True or false: <ol> is an ordered list. (a) False (b) True
  8. 8.💬 Which text will NOT show on the page?
    <!-- <p>The red kite</p> -->
    <p>Good morning!</p>
    <p>Fun facts</p>
    (a) The red kite (b) Fun facts (c) Good morning!
  9. 9.💬 How does an HTML comment start? (a) /* (b) # (c) <!-- (d) //
  10. 10.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  11. 11.🔠 Which heading shows the SMALLEST text: <h5>, <h3>, <h6> or <h1>? (a) <h1> (b) <h6> (c) <h3> (d) <h5>
  12. 12.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>Our school trip</p> -->
  13. 13.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="50">
    (a) width (b) A red kite (c) tiger.jpg (d) A tiger asleep
  14. 14.📄 Which part holds everything you see on the page? (a) the body (b) the doctype (c) the title (d) the head
  15. 15.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <p>Fun facts</p>
    <p>Our school trip</p>
    <!-- <p>Good morning!</p> -->
    <p>Hello, world!</p>
  16. 16.📋 How many items does this list show?
    <ul>
      <li>Litchi</li>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Grapes</li>
    </ul>
  17. 17.🌐 Which one colours code to help us? (a) a web server (b) a web browser (c) a code editor
  18. 18.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <h2>My best friend</h2>
    <h2>My pets</h2>
  19. 19.🔍 Which line is missing its closing tag?
    line 1: <i>The red kite
    line 2: <h2>Rain today</h2>
    line 3: <b>Good morning!</b>
    (a) line 2 (b) line 1 (c) line 3
  20. 20.📄 Can HTML on its own make links to pages? (a) Yes (b) No
  21. 21.🔗 What does target="_blank" do to a link? (a) makes it blank (b) makes it bold (c) hides the link (d) opens it in a new tab
  22. 22.📋 What number does the browser show next to “Papaya”?
    <ol>
      <li>Guava</li>
      <li>Papaya</li>
      <li>Orange</li>
    </ol>
  23. 23.🔗 Which attribute holds the address of a link? (a) id (b) src (c) href (d) alt
  24. 24.🔢 In a basic web page file, which comes LAST? (a) <!DOCTYPE html> (b) </head> (c) <body> (d) </html>
  25. 25.🔗 Where does this link open?
    <a href="art.html" target="_blank">School news</a>
    (a) in a new tab (b) in the same tab
  26. 26.🌐 Which one shows line numbers? (a) a web server (b) a code editor (c) a web browser
  27. 27.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Hello, world!</p>
    <!-- <p>Good morning!</p> -->
    <p>My pets</p>
  28. 28.True or false: in <img>, width shows if the image fails. (a) False (b) True
  29. 29.🖼️ Which tag puts a picture on a page? (a) <a> (b) <p> (c) <img> (d) <pic>
  30. 30.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <a> (c) <title> (d) <style>
  31. 31.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <h2>Fun facts</h2>
    <h2>The red kite</h2>
  32. 32.💬 Does the browser show comments on the page? (a) No (b) Yes
  33. 33.📄 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>Mars is red.</p>
    </body>
    </html>
    (a) Match report (b) Riya’s Recipes (c) index.html (d) Mars is red.
  34. 34.📋 Which list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <br> (d) <ul>
  35. 35.🔗 Which address opens when you click this link?
    <a href="contact.html">Take the quiz</a>
    (a) contact.html (b) Take the quiz (c) maths.html (d) https://example.com
  36. 36.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <h2>Our school trip</h2>
    <h2>My pets</h2>
  37. 37.True or false: HTML on its own cannot add pictures to a page. (a) False (b) True
  38. 38.🔤 In “HTML”, what does the M stand for? (a) Markup (b) Machine (c) Mouse (d) Modern
  39. 39.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Roses are red<br>Stars shine<br>Rivers flow<br>Kites fly high</p>
  40. 40.🔍 One closing tag is missing. Which one?
    <strong>My pets</strong>
    <h3>Cricket is fun.</h3>
    <h1>Rain today
    (a) </h2> (b) </strong> (c) </h3> (d) </h1>

Answer key

  1. <h6>
  2. <h1>
  3. <img>
  4. False
  5. Yes
  6. text with links
  7. True
  8. The red kite
  9. <!--
  10. No
  11. <h6>
  12. 2
  13. A tiger asleep
  14. the body
  15. 4
  16. 6
  17. a code editor
  18. 1
  19. line 1
  20. Yes
  21. opens it in a new tab
  22. 2
  23. href
  24. </html>
  25. in a new tab
  26. a code editor
  27. 2
  28. False
  29. <img>
  30. <a>
  31. 1
  32. No
  33. Riya’s Recipes
  34. <ul>
  35. contact.html
  36. 1
  37. False
  38. Markup
  39. 5
  40. </h1>

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