← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 9 · 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 goes in the body? (a) <p> (b) <meta charset="utf-8"> (c) <title> (d) <style>
  2. 2.Which of these is a closing tag? (a) <body> (b) <title> (c) </h1> (d) <b>
  3. 3.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Hello, world!</p>
    <h2>I love mangoes.</h2>
  4. 4.🔗 Which address opens when you click this link?
    <a href="games.html">Contact us</a>
    (a) about.html (b) contact.html (c) games.html (d) Contact us
  5. 5.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="100">
  6. 6.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  7. 7.True or false: <meta> has a closing tag. (a) False (b) True
  8. 8.📝 What does <br> do? (a) makes text bold (b) makes a list (c) adds a picture (d) starts a new line
  9. 9.True or false: <style> goes in the body. (a) True (b) False
  10. 10.True or false: HTML on its own can make links to pages. (a) True (b) False
  11. 11.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
  12. 12.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>The red kite</p>
    <h3>My pets</h3>
  13. 13.🔗 Which words do you click on?
    <a href="art.html">School news</a>
    (a) School news (b) Take the quiz (c) art.html (d) href
  14. 14.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
  15. 15.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
  16. 16.💬 Why do coders write comments? (a) to add colour (b) to show pictures (c) to make links (d) to leave notes
  17. 17.Which of these goes in the body? (a) <img> (b) <link rel="stylesheet"> (c) <style> (d) <meta charset="utf-8">
  18. 18.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <p>Hello, world!</p>
    <p>My pets</p>
    <p>Rain today</p>
  19. 19.📋 Does this list show bullets or numbers?
    <ol>
      <li>Mango</li>
      <li>Banana</li>
    </ol>
    (a) bullets (b) numbers
  20. 20.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h1> or <h6>? (a) <h1> (b) <h2> (c) <h4> (d) <h6>
  21. 21.📄 Where does <a> go: in the head or in the body? (a) in the body (b) in the head
  22. 22.🌐 Which one has an address bar? (a) a web browser (b) a code editor (c) a web server
  23. 23.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) height (c) alt (d) src
  24. 24.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h1> or <h5>? (a) <h6> (b) <h5> (c) <h1> (d) <h3>
  25. 25.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h6> or <h3>? (a) <h6> (b) <h3> (c) <h2> (d) <h1>
  26. 26.🖼️ 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) A tiger asleep (d) tiger.jpg
  27. 27.🔗 Which words do you click on?
    <a href="https://example.com">Contact us</a>
    (a) https://example.com (b) Visit the site (c) href (d) Contact us
  28. 28.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Rivers flow<br>Kites fly high<br>Roses are red<br>Birds sing</p>
  29. 29.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) src (d) href
  30. 30.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="300">
    (a) Map of India (b) cake.jpg (c) dog.jpg (d) map.png
  31. 31.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 3 (c) 10 (d) 1
  32. 32.True or false: HTML on its own can make tables. (a) False (b) True
  33. 33.🏷️ Which is the closing tag for <p>? (a) <p/> (b) <\p> (c) </p> (d) <p>
  34. 34.💬 Does the browser show comments on the page? (a) No (b) Yes
  35. 35.🔗 Which address opens when you click this link?
    <a href="about.html">Maths fun</a>
    (a) about.html (b) Maths fun (c) contact.html (d) https://example.com
  36. 36.📄 Which part holds everything you see on the page? (a) the doctype (b) the body (c) the head (d) the title
  37. 37.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h3>My pets</h3>
    <p>My best friend</p>
    <p>The red kite</p>
    <p>Good morning!</p>
  38. 38.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
  39. 39.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <hr> (d) <ul>
  40. 40.True or false: in <img>, height describes the picture. (a) True (b) False

Answer key

  1. <p>
  2. </h1>
  3. 2
  4. games.html
  5. 100
  6. Yes
  7. False
  8. starts a new line
  9. False
  10. True
  11. in the body
  12. 2
  13. School news
  14. <ul>
  15. in the head
  16. to leave notes
  17. <img>
  18. 4
  19. numbers
  20. <h1>
  21. in the body
  22. a web browser
  23. width
  24. <h6>
  25. <h6>
  26. A tiger asleep
  27. Contact us
  28. 5
  29. href
  30. map.png
  31. 1
  32. True
  33. </p>
  34. No
  35. about.html
  36. the body
  37. 2
  38. Yes
  39. <ol>
  40. False

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