← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 823 · 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 is an empty tag? (a) <h1> (b) <p> (c) <br> (d) <b>
  2. 2.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>Cricket is fun.</p>
    <!-- <p>Hello, world!</p> -->
  3. 3.🏷️ HTML marks up text using ___. (a) wires (b) keys (c) tags (d) pixels
  4. 4.🔍 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
  5. 5.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) My Hobbies (b) All about me (c) index.html (d) I like to read.
  6. 6.📄 Can HTML on its own keep a high score? (a) No (b) Yes
  7. 7.Which of these is a closing tag? (a) </li> (b) <b> (c) <body> (d) <p>
  8. 8.💬 How does an HTML comment end? (a) */ (b) >> (c) --> (d) //
  9. 9.Which of these is true of a web server? (a) shows pages from the web (b) has an address bar (c) colours code to help us (d) answers page requests
  10. 10.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <p>My best friend</p>
    <p>My pets</p>
  11. 11.Which of these is an opening tag? (a) <p> (b) </b> (c) </h1> (d) </li>
  12. 12.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 3 (c) 1 (d) 6
  13. 13.📋 What number does the browser show next to “Mango”?
    <ol start="8">
      <li>Orange</li>
      <li>Mango</li>
      <li>Banana</li>
    </ol>
  14. 14.🔢 In a basic web page file, which comes first: “<html>” or “<!DOCTYPE html>”? (a) <html> (b) <!DOCTYPE html>
  15. 15.True or false: a code editor is where we type code. (a) False (b) True
  16. 16.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <p>Rain today</p>
    <!-- <p>My pets</p> -->
    (a) Hello, world! (b) Rain today (c) My pets
  17. 17.🔗 Which words do you click on?
    <a href="games.html">Art corner</a>
    (a) School news (b) Art corner (c) games.html (d) href
  18. 18.Which of these goes in the head? (a) <p> (b) <a> (c) <table> (d) <link rel="stylesheet">
  19. 19.📄 Which part holds everything you see on the page? (a) the body (b) the head (c) the title (d) the doctype
  20. 20.🔗 Which words do you click on?
    <a href="games.html">Contact us</a>
    (a) games.html (b) Contact us (c) Visit the site (d) href
  21. 21.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h6> or <h3>? (a) <h2> (b) <h1> (c) <h6> (d) <h3>
  22. 22.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <p>I love mangoes.</p>
    <p>I love mangoes.</p>
    <p>My pets</p>
  23. 23.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
  24. 24.📋 Does this list show bullets or numbers?
    <ul>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Jamun</li>
    </ul>
    (a) bullets (b) numbers
  25. 25.Which of these has a closing tag? (a) <br> (b) <img> (c) <ul> (d) <hr>
  26. 26.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <hr> (d) <ol>
  27. 27.Which of these is true of a code editor? (a) shows pages from the web (b) sends pages over the net (c) has an address bar (d) is where we type code
  28. 28.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>Our school trip</p>
    <p>I love mangoes.</p>
    <h4>Rain today</h4>
  29. 29.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h3> or <h4>? (a) <h3> (b) <h6> (c) <h4> (d) <h2>
  30. 30.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="250">
    (a) width (b) The full moon (c) dog.jpg (d) A happy dog
  31. 31.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
  32. 32.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dollar $ (c) a dot . (d) a slash /
  33. 33.True or false: HTML on its own cannot make links to pages. (a) True (b) False
  34. 34.True or false: <table> goes in the head. (a) False (b) True
  35. 35.🖼️ Which attribute of <img> describes the picture? (a) height (b) src (c) alt (d) width
  36. 36.🔤 In “HTML”, what do the letters HT stand for? (a) Hot Tags (b) Home Text (c) HyperText (d) High Tech
  37. 37.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h6> or <h4>? (a) <h2> (b) <h4> (c) <h1> (d) <h6>
  38. 38.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <h2>Rain today</h2>
    <h2>Hello, world!</h2>
    <h2>Rain today</h2>
  39. 39.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <p>Hello, world!</p>
    <p>Good morning!</p>
    <p>Rain today</p>
  40. 40.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Fun facts</p>
    <p>Cricket is fun.</p>
    <h2>The red kite</h2>
    <h4>I love mangoes.</h4>

Answer key

  1. <br>
  2. 1
  3. tags
  4. shows pages from the web
  5. My Hobbies
  6. No
  7. </li>
  8. -->
  9. answers page requests
  10. 2
  11. <p>
  12. 1
  13. 9
  14. <!DOCTYPE html>
  15. True
  16. My pets
  17. Art corner
  18. <link rel="stylesheet">
  19. the body
  20. Contact us
  21. <h1>
  22. 4
  23. Yes
  24. bullets
  25. <ul>
  26. <ol>
  27. is where we type code
  28. 2
  29. <h2>
  30. A happy dog
  31. in the head
  32. a slash /
  33. False
  34. False
  35. alt
  36. HyperText
  37. <h6>
  38. 1
  39. 3
  40. 3

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