← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 723 · 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) <img> (c) <li> (d) <ul>
  2. 2.🔍 One closing tag is missing. Which one?
    <h1>The red kite</h1>
    <p>Hello, world!</p>
    <h3>My pets
    (a) </p> (b) </u> (c) </h1> (d) </h3>
  3. 3.📋 Which list tag is an unordered list? (a) <ol> (b) <li> (c) <ul>
  4. 4.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>Rain today</p>
    <h2>Cricket is fun.</h2>
  5. 5.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h2>Cricket is fun.</h2>
    <h4>Rain today</h4>
    <h3>My pets</h3>
  6. 6.📝 What does <hr> draw? (a) a link (b) a table (c) a line across the page (d) a picture
  7. 7.Which of these is a closing tag? (a) <title> (b) <p> (c) </p> (d) <b>
  8. 8.🔗 What does HyperText mean? (a) very big text (b) secret text (c) text in colour (d) text with links
  9. 9.🌐 Which one shows pages from the web? (a) a web server (b) a code editor (c) a web browser
  10. 10.True or false: in <img>, width names the picture file. (a) False (b) True
  11. 11.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) href (d) id
  12. 12.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <!-- <p>My pets</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>Fun facts</p> -->
  13. 13.True or false: <ul> lists steps in order. (a) False (b) True
  14. 14.True or false: <link rel="stylesheet"> goes in the body. (a) True (b) False
  15. 15.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  16. 16.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <h2>Fun facts</h2>
    <p>Our school trip</p>
  17. 17.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  18. 18.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  19. 19.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a hash # (c) a dollar $ (d) a dot .
  20. 20.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Roses are red</p>
  21. 21.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  22. 22.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <hr> (d) <ul>
  23. 23.True or false: a web browser shows pages from the web. (a) True (b) False
  24. 24.🌐 Which one has an address bar? (a) a web server (b) a code editor (c) a web browser
  25. 25.Which of these goes in the head? (a) <h1> (b) <style> (c) <a> (d) <img>
  26. 26.True or false: in <img>, src sets how wide it is. (a) False (b) True
  27. 27.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  28. 28.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="400">
    (a) Map of India (b) cake.jpg (c) map.png (d) dog.jpg
  29. 29.True or false: <ul> lists things in any order. (a) False (b) True
  30. 30.Which of these goes in the body? (a) <style> (b) <link rel="stylesheet"> (c) <a> (d) <meta charset="utf-8">
  31. 31.True or false: <table> goes in the body. (a) True (b) False
  32. 32.Which of these is an empty tag? (a) <title> (b) <p> (c) <br> (d) <ul>
  33. 33.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h5> or <h2>? (a) <h1> (b) <h3> (c) <h2> (d) <h5>
  34. 34.Which of these is true of a code editor? (a) answers page requests (b) saves our .html files (c) opens web pages for us (d) hosts websites online
  35. 35.🔠 Are headings shown in bold by default? (a) Yes (b) No
  36. 36.🔗 Which tag makes a clickable link? (a) <a> (b) <img> (c) <link> (d) <p>
  37. 37.🔗 Where does this link open?
    <a href="https://example.com">Play games</a>
    (a) in the same tab (b) in a new tab
  38. 38.📝 What does <br> do? (a) adds a picture (b) starts a new line (c) makes text bold (d) makes a list
  39. 39.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <p>Fun facts</p>
    <!-- <p>Good morning!</p> -->
    <p>Cricket is fun.</p>
    <!-- <p>Our school trip</p> -->
  40. 40.Which of these is a closing tag? (a) <p> (b) <li> (c) </body> (d) <title>

Answer key

  1. <img>
  2. </h3>
  3. <ul>
  4. 2
  5. 4
  6. a line across the page
  7. </p>
  8. text with links
  9. a web browser
  10. False
  11. href
  12. 1
  13. False
  14. False
  15. Yes
  16. 2
  17. an opening tag
  18. in the head
  19. a slash /
  20. 2
  21. has a closing tag
  22. <ol>
  23. True
  24. a web browser
  25. <style>
  26. False
  27. has a closing tag
  28. map.png
  29. True
  30. <a>
  31. True
  32. <br>
  33. <h5>
  34. saves our .html files
  35. Yes
  36. <a>
  37. in the same tab
  38. starts a new line
  39. 2
  40. </body>

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