← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 320 · 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.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Sky is blue<br>Birds sing<br>Kites fly high<br>Roses are red</p>
  2. 2.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ol> (c) <br> (d) <ul>
  3. 3.🌐 Which one shows pages from the web? (a) a web server (b) a code editor (c) a web browser
  4. 4.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>I love mangoes.</p>
    <!-- <p>My best friend</p> -->
    (a) My pets (b) I love mangoes. (c) My best friend
  5. 5.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  6. 6.🔗 Which words do you click on?
    <a href="quiz.html">Art corner</a>
    (a) Art corner (b) href (c) School news (d) quiz.html
  7. 7.True or false: <h1> is an empty tag. (a) False (b) True
  8. 8.🔗 Which words do you click on?
    <a href="contact.html">Contact us</a>
    (a) contact.html (b) Visit the site (c) Contact us (d) href
  9. 9.📝 Does <input> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  10. 10.💬 Why do coders write comments? (a) to show pictures (b) to add colour (c) to leave notes (d) to make links
  11. 11.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h4> or <h6>? (a) <h4> (b) <h6> (c) <h1> (d) <h3>
  12. 12.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
  13. 13.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h2>My best friend</h2>
    <p>Good morning!</p>
    <p>I love mangoes.</p>
    <p>Fun facts</p>
  14. 14.True or false: <link rel="stylesheet"> goes in the body. (a) False (b) True
  15. 15.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="200">
  16. 16.🖼️ Which attribute of <img> describes the picture? (a) src (b) height (c) width (d) alt
  17. 17.True or false: in <img>, src describes the picture. (a) False (b) True
  18. 18.🔗 Which words do you click on?
    <a href="contact.html">Play games</a>
    (a) Play games (b) contact.html (c) href (d) About us
  19. 19.🔗 What does HyperText mean? (a) very big text (b) text in colour (c) text with links (d) secret text
  20. 20.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to colour it (c) to describe the image (d) to make it bigger
  21. 21.True or false: <ul> goes in the head. (a) False (b) True
  22. 22.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <p>Good morning!</p>
    <p>Our school trip</p>
  23. 23.🖼️ Which tag puts a picture on a page? (a) <img> (b) <a> (c) <p> (d) <pic>
  24. 24.📝 What does <br> do? (a) starts a new line (b) makes text bold (c) makes a list (d) adds a picture
  25. 25.🔗 Which words do you click on?
    <a href="contact.html">Visit the site</a>
    (a) Maths fun (b) Visit the site (c) contact.html (d) href
  26. 26.📋 Which list suits a shopping list in any order? (a) <hr> (b) <br> (c) <ul> (d) <ol>
  27. 27.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h2> or <h6>? (a) <h1> (b) <h2> (c) <h6> (d) <h5>
  28. 28.True or false: HTML on its own can make headings. (a) True (b) False
  29. 29.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h6> or <h2>? (a) <h2> (b) <h6> (c) <h3> (d) <h5>
  30. 30.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Guava</li>
      <li>Banana</li>
      <li>Papaya</li>
    </ul>
  31. 31.True or false: <ul> lists things in any order. (a) False (b) True
  32. 32.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  33. 33.🏷️ Which is the closing tag for <i>? (a) <i/> (b) </i> (c) <i> (d) <\i>
  34. 34.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Sky is blue</p>
  35. 35.📋 What number does the browser show next to “Jamun”?
    <ol start="3">
      <li>Guava</li>
      <li>Litchi</li>
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Banana</li>
    </ol>
  36. 36.🔢 In a basic web page file, which comes first: “<html>” or “</head>”? (a) <html> (b) </head>
  37. 37.📋 Which list tag shows bullet points? (a) <li> (b) <ul> (c) <ol>
  38. 38.🔠 How many heading levels does HTML have? (a) 6 (b) 10 (c) 4 (d) 3
  39. 39.🔗 Where does this link open?
    <a href="contact.html">Play games</a>
    (a) in a new tab (b) in the same tab
  40. 40.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="350">
    (a) A tiger asleep (b) fort.jpg (c) An old fort (d) width

Answer key

  1. 5
  2. <ol>
  3. a web browser
  4. My best friend
  5. in the head
  6. Art corner
  7. False
  8. Contact us
  9. an empty tag
  10. to leave notes
  11. <h1>
  12. in the head
  13. 2
  14. False
  15. 200
  16. alt
  17. False
  18. Play games
  19. text with links
  20. to describe the image
  21. False
  22. 2
  23. <img>
  24. starts a new line
  25. Visit the site
  26. <ul>
  27. <h6>
  28. True
  29. <h2>
  30. 4
  31. True
  32. a closing tag
  33. </i>
  34. 2
  35. 6
  36. <html>
  37. <ul>
  38. 6
  39. in the same tab
  40. An old fort

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