← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 975 · 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 is the closing tag for <h1>? (a) <\h1> (b) </h1> (c) <h1/> (d) <h1>
  2. 2.📋 Does this list show bullets or numbers?
    <ul>
      <li>Grapes</li>
      <li>Banana</li>
    </ul>
    (a) numbers (b) bullets
  3. 3.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  4. 4.True or false: in <img>, src tells which image to load. (a) True (b) False
  5. 5.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Rivers flow</p>
  6. 6.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a src="about.html"> (c) <link about.html> (d) <a alt="about.html">
  7. 7.True or false: in <img>, height shows if the image fails. (a) True (b) False
  8. 8.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <a> (d) <p>
  9. 9.🔗 Which address opens when you click this link?
    <a href="news.html">Contact us</a>
    (a) quiz.html (b) news.html (c) Contact us (d) games.html
  10. 10.📋 Does this list show bullets or numbers?
    <ul>
      <li>Jamun</li>
      <li>Litchi</li>
    </ul>
    (a) bullets (b) numbers
  11. 11.💬 Which text will NOT show on the page?
    <!-- <p>My best friend</p> -->
    <p>Cricket is fun.</p>
    <p>The red kite</p>
    <p>Hello, world!</p>
    (a) Cricket is fun. (b) The red kite (c) Hello, world! (d) My best friend
  12. 12.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Orange</li>
    </ul>
  13. 13.🔠 Are headings shown in bold by default? (a) Yes (b) No
  14. 14.🔗 Which address opens when you click this link?
    <a href="about.html">Art corner</a>
    (a) about.html (b) contact.html (c) https://example.com (d) Art corner
  15. 15.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="150">
  16. 16.🔗 Where does this link open?
    <a href="contact.html" target="_blank">School news</a>
    (a) in a new tab (b) in the same tab
  17. 17.📋 How many items does this list show?
    <ul>
      <li>Grapes</li>
      <li>Litchi</li>
      <li>Guava</li>
      <li>Jamun</li>
      <li>Orange</li>
    </ul>
  18. 18.📄 Where does <a> go: in the head or in the body? (a) in the body (b) in the head
  19. 19.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <p>Hello, world!</p>
    <!-- <p>I love mangoes.</p> -->
  20. 20.💬 Which text will NOT show on the page?
    <!-- <p>Fun facts</p> -->
    <p>I love mangoes.</p>
    <p>Good morning!</p>
    (a) Good morning! (b) I love mangoes. (c) Fun facts
  21. 21.🔗 Which attribute holds the address of a link? (a) href (b) id (c) alt (d) src
  22. 22.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h4>Our school trip</h4>
    <p>My best friend</p>
    <p>My pets</p>
    <h4>Fun facts</h4>
  23. 23.🔗 Where does this link open?
    <a href="news.html" target="_blank">Visit the site</a>
    (a) in a new tab (b) in the same tab
  24. 24.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h2>I love mangoes.</h2>
    <h3>The red kite</h3>
    <p>Good morning!</p>
    <p>Hello, world!</p>
  25. 25.💬 Which text will NOT show on the page?
    <!-- <p>Good morning!</p> -->
    <p>Cricket is fun.</p>
    <p>I love mangoes.</p>
    <p>My best friend</p>
    (a) My best friend (b) Good morning! (c) I love mangoes. (d) Cricket is fun.
  26. 26.True or false: in <img>, height is read by screen readers. (a) False (b) True
  27. 27.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
  28. 28.True or false: a code editor shows pages from the web. (a) False (b) True
  29. 29.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
  30. 30.🏷️ Every HTML tag starts with which sign? (a) { (b) ( (c) < (d) [
  31. 31.True or false: HTML on its own can pick a random number. (a) False (b) True
  32. 32.🔗 What does HyperText mean? (a) text with links (b) secret text (c) text in colour (d) very big text
  33. 33.True or false: <img> has a closing tag. (a) True (b) False
  34. 34.🔍 Which is the odd one out? (a) shows line numbers (b) opens web pages for us (c) turns HTML into a page (d) has an address bar
  35. 35.🔗 Where does this link open?
    <a href="contact.html">School news</a>
    (a) in the same tab (b) in a new tab
  36. 36.🔠 How many heading levels does HTML have? (a) 4 (b) 10 (c) 3 (d) 6
  37. 37.True or false: a web server sends pages over the net. (a) False (b) True
  38. 38.💾 A web page file usually ends with which extension? (a) .png (b) .mp3 (c) .txt (d) .html
  39. 39.True or false: a code editor shows line numbers. (a) False (b) True
  40. 40.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) </body> (c) <head> (d) </head>

Answer key

  1. </h1>
  2. bullets
  3. an empty tag
  4. True
  5. 2
  6. <a href="about.html">
  7. False
  8. <a>
  9. news.html
  10. bullets
  11. My best friend
  12. 3
  13. Yes
  14. about.html
  15. 150
  16. in a new tab
  17. 5
  18. in the body
  19. 2
  20. Fun facts
  21. href
  22. 3
  23. in a new tab
  24. 3
  25. Good morning!
  26. False
  27. in the body
  28. False
  29. in the body
  30. <
  31. False
  32. text with links
  33. False
  34. shows line numbers
  35. in the same tab
  36. 6
  37. True
  38. .html
  39. True
  40. <!DOCTYPE html>

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