← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 231 · 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 text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>The red kite</p>
    <p>Hello, world!</p>
    <p>Rain today</p>
    (a) My pets (b) The red kite (c) Rain today (d) Hello, world!
  2. 2.📋 How many items does this list show?
    <ul>
      <li>Orange</li>
      <li>Guava</li>
      <li>Grapes</li>
      <li>Banana</li>
    </ul>
  3. 3.Which of these has a closing tag? (a) <hr> (b) <img> (c) <br> (d) <ul>
  4. 4.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <!-- <p>Good morning!</p> -->
    <p>Hello, world!</p>
    (a) My pets (b) Good morning! (c) Hello, world!
  5. 5.🌐 Which one saves our .html files? (a) a web server (b) a web browser (c) a code editor
  6. 6.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Mars is red. (b) All about me (c) Riya’s Recipes (d) body
  7. 7.🔠 Are headings shown in bold by default? (a) No (b) Yes
  8. 8.🔗 Where does this link open?
    <a href="news.html">Visit the site</a>
    (a) in the same tab (b) in a new tab
  9. 9.True or false: HTML on its own cannot make a form. (a) True (b) False
  10. 10.Which of these goes in the body? (a) <style> (b) <link rel="stylesheet"> (c) <title> (d) <table>
  11. 11.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="150">
    (a) bus.jpg (b) moon.png (c) fort.jpg (d) The full moon
  12. 12.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h6> or <h1>? (a) <h1> (b) <h6> (c) <h5> (d) <h3>
  13. 13.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <h2>The red kite</h2>
    <h2>I love mangoes.</h2>
    <h2>My best friend</h2>
    <p>The red kite</p>
    <h2>My best friend</h2>
  14. 14.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  15. 15.🔗 Which attribute holds the address of a link? (a) href (b) id (c) alt (d) src
  16. 16.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <title> (c) <h1> (d) <style>
  17. 17.🔍 Which is the odd one out? (a) colours code to help us (b) saves our .html files (c) is where we type code (d) hosts websites online
  18. 18.🔠 Which tag is the least important heading? (a) <h1> (b) <h6> (c) <h3> (d) <p>
  19. 19.🔗 Which words do you click on?
    <a href="maths.html">Art corner</a>
    (a) Art corner (b) href (c) maths.html (d) School news
  20. 20.Which of these is true of a web browser? (a) shows line numbers (b) answers page requests (c) saves our .html files (d) has an address bar
  21. 21.💬 How does an HTML comment start? (a) <!-- (b) # (c) /* (d) //
  22. 22.🔗 Which address opens when you click this link?
    <a href="contact.html">About us</a>
    (a) About us (b) https://example.com (c) maths.html (d) contact.html
  23. 23.🏷️ Every HTML tag starts with which sign? (a) { (b) [ (c) ( (d) <
  24. 24.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
  25. 25.🔗 Which address opens when you click this link?
    <a href="about.html">Art corner</a>
    (a) contact.html (b) about.html (c) Art corner (d) https://example.com
  26. 26.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Rivers flow<br>Stars shine</p>
  27. 27.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Guava</li>
    </ul>
    (a) bullets (b) numbers
  28. 28.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h4> or <h1>? (a) <h1> (b) <h4> (c) <h5> (d) <h2>
  29. 29.🔗 Where does this link open?
    <a href="games.html" target="_blank">Play games</a>
    (a) in the same tab (b) in a new tab
  30. 30.True or false: <input> has a closing tag. (a) True (b) False
  31. 31.🌐 Which one shows line numbers? (a) a web browser (b) a web server (c) a code editor
  32. 32.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
    <p>Fun facts</p>
    <!-- <p>Rain today</p> -->
  33. 33.True or false: <ol> is an unordered list. (a) False (b) True
  34. 34.🏷️ HTML marks up text using ___. (a) tags (b) keys (c) pixels (d) wires
  35. 35.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>Our school trip</p> -->
    <p>My pets</p>
  36. 36.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h4>My best friend</h4>
    <p>Good morning!</p>
    <p>Cricket is fun.</p>
  37. 37.📝 Does <input> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  38. 38.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) attribute (c) address (d) editor
  39. 39.True or false: a web server stores a website’s files. (a) False (b) True
  40. 40.📝 What does <p> make? (a) a paragraph (b) a link (c) a table (d) a picture

Answer key

  1. My pets
  2. 4
  3. <ul>
  4. Good morning!
  5. a code editor
  6. All about me
  7. Yes
  8. in the same tab
  9. False
  10. <table>
  11. moon.png
  12. <h1>
  13. 2
  14. No
  15. href
  16. <h1>
  17. hosts websites online
  18. <h6>
  19. Art corner
  20. has an address bar
  21. <!--
  22. contact.html
  23. <
  24. in the body
  25. about.html
  26. 3
  27. bullets
  28. <h5>
  29. in a new tab
  30. False
  31. a code editor
  32. 3
  33. False
  34. tags
  35. 1
  36. 2
  37. an empty tag
  38. element
  39. True
  40. a paragraph

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