← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 198 · 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.True or false: a web server saves our .html files. (a) True (b) False
  2. 2.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Birds sing<br>Sky is blue</p>
  3. 3.🔗 Which words do you click on?
    <a href="quiz.html">About us</a>
    (a) quiz.html (b) Contact us (c) About us (d) href
  4. 4.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="350">
    (a) map.png (b) width (c) Birthday cake (d) Map of India
  5. 5.🔢 In a basic web page file, which comes first: “</html>” or “<html>”? (a) <html> (b) </html>
  6. 6.True or false: HTML on its own cannot pick a random number. (a) True (b) False
  7. 7.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Stars shine</p>
  8. 8.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>I love mangoes.</p>
    <!-- <p>My pets</p> -->
    <p>The red kite</p>
    <!-- <p>Hello, world!</p> -->
  9. 9.Which of these goes in the body? (a) <ul> (b) <meta charset="utf-8"> (c) <link rel="stylesheet"> (d) <title>
  10. 10.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <!-- <p>Rain today</p> -->
    <p>Good morning!</p>
    <!-- <p>My pets</p> -->
    <p>Our school trip</p>
  11. 11.💬 Does the browser show comments on the page? (a) Yes (b) No
  12. 12.True or false: <input> has a closing tag. (a) True (b) False
  13. 13.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <!-- <p>Rain today</p> -->
    <p>Our school trip</p>
  14. 14.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="400">
    (a) dog.jpg (b) moon.png (c) cake.jpg (d) Birthday cake
  15. 15.📋 What number does the browser show next to “Litchi”?
    <ol start="5">
      <li>Mango</li>
      <li>Banana</li>
      <li>Litchi</li>
      <li>Guava</li>
      <li>Jamun</li>
      <li>Orange</li>
    </ol>
  16. 16.📄 Which part holds everything you see on the page? (a) the body (b) the doctype (c) the title (d) the head
  17. 17.🖼️ Which attribute of <img> tells which image to load? (a) width (b) alt (c) height (d) src
  18. 18.📋 Which list tag is an ordered list? (a) <ul> (b) <li> (c) <ol>
  19. 19.📝 Does <br> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  20. 20.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="300">
    (a) bus.jpg (b) Our school bus (c) fort.jpg (d) tiger.jpg
  21. 21.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
  22. 22.📋 Which list tag lists steps in order? (a) <li> (b) <ul> (c) <ol>
  23. 23.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h2>Rain today</h2>
    <p>Rain today</p>
    <p>Fun facts</p>
  24. 24.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) alt (c) width (d) height
  25. 25.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as a new line (c) as 5 spaces (d) as one space
  26. 26.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>Fun facts</p>
    <p>Our school trip</p>
    <p>The red kite</p>
  27. 27.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  28. 28.Which of these is true of a web server? (a) saves our .html files (b) opens web pages for us (c) is where we type code (d) stores a website’s files
  29. 29.🔗 Which address opens when you click this link?
    <a href="maths.html">Maths fun</a>
    (a) maths.html (b) art.html (c) Maths fun (d) news.html
  30. 30.🔗 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
  31. 31.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="50">
  32. 32.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <p>The red kite</p>
    <p>Cricket is fun.</p>
    <!-- <p>Our school trip</p> -->
  33. 33.💬 How does an HTML comment start? (a) # (b) <!-- (c) /* (d) //
  34. 34.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
  35. 35.📋 Does this list show bullets or numbers?
    <ol>
      <li>Banana</li>
      <li>Orange</li>
      <li>Guava</li>
    </ol>
    (a) bullets (b) numbers
  36. 36.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h6> or <h2>? (a) <h4> (b) <h5> (c) <h2> (d) <h6>
  37. 37.True or false: HTML on its own can make links to pages. (a) False (b) True
  38. 38.🏷️ Which is the closing tag for <h2>? (a) <\h2> (b) <h2/> (c) </h2> (d) <h2>
  39. 39.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ul> (d) <ol>
  40. 40.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="400">
    (a) tiger.jpg (b) kite.png (c) A tiger asleep (d) map.png

Answer key

  1. False
  2. 3
  3. About us
  4. Map of India
  5. <html>
  6. True
  7. 2
  8. 2
  9. <ul>
  10. 2
  11. No
  12. False
  13. 1
  14. cake.jpg
  15. 7
  16. the body
  17. src
  18. <ol>
  19. an empty tag
  20. bus.jpg
  21. No
  22. <ol>
  23. 2
  24. height
  25. as one space
  26. 3
  27. has a closing tag
  28. stores a website’s files
  29. maths.html
  30. games.html
  31. 50
  32. 3
  33. <!--
  34. in the head
  35. numbers
  36. <h6>
  37. True
  38. </h2>
  39. <ul>
  40. tiger.jpg

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