← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 379 · 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 picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="400">
    (a) map.png (b) A tiger asleep (c) tiger.jpg (d) kite.png
  2. 2.🔗 Which words do you click on?
    <a href="about.html">School news</a>
    (a) Take the quiz (b) School news (c) href (d) about.html
  3. 3.True or false: a code editor hosts websites online. (a) True (b) False
  4. 4.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  5. 5.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  6. 6.True or false: <meta> has a closing tag. (a) True (b) False
  7. 7.🔍 One closing tag is missing. Which one?
    <h3>My pets
    <u>Good morning!</u>
    <h1>Hello, world!</h1>
    (a) </u> (b) </h1> (c) </h3> (d) </h2>
  8. 8.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  9. 9.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="350">
  10. 10.Which of these is an opening tag? (a) </li> (b) <b> (c) </p> (d) </h1>
  11. 11.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Space Facts (b) body (c) Try this poha. (d) My drawings
  12. 12.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <p>My best friend</p>
    <!-- <p>Good morning!</p> -->
    (a) My best friend (b) Our school trip (c) Good morning!
  13. 13.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Roses are red<br>Stars shine</p>
  14. 14.Which of these is true of a code editor? (a) has an address bar (b) sends pages over the net (c) stores a website’s files (d) saves our .html files
  15. 15.🔢 In a basic web page file, which comes first: “</body>” or “</html>”? (a) </body> (b) </html>
  16. 16.🔠 How many heading levels does HTML have? (a) 10 (b) 4 (c) 6 (d) 3
  17. 17.True or false: HTML on its own cannot make headings. (a) False (b) True
  18. 18.True or false: <ul> lists steps in order. (a) True (b) False
  19. 19.🔤 In “HTML”, what do the letters HT stand for? (a) Home Text (b) HyperText (c) High Tech (d) Hot Tags
  20. 20.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) body (b) Planets (c) Here is my best one. (d) Space Facts
  21. 21.🔗 Where does this link open?
    <a href="https://example.com" target="_blank">School news</a>
    (a) in the same tab (b) in a new tab
  22. 22.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) hides the link (c) makes it blank (d) makes it bold
  23. 23.True or false: <li> is an empty tag. (a) False (b) True
  24. 24.True or false: HTML on its own cannot make tables. (a) False (b) True
  25. 25.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Good morning!</p>
    <p>Hello, world!</p>
  26. 26.Which of these is true of a web browser? (a) sends pages over the net (b) hosts websites online (c) opens web pages for us (d) colours code to help us
  27. 27.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <!-- <p>Fun facts</p> -->
    <p>I love mangoes.</p>
    (a) Fun facts (b) I love mangoes. (c) My best friend
  28. 28.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <h4>Hello, world!</h4>
    <h4>The red kite</h4>
    <p>The red kite</p>
  29. 29.🖼️ Which attribute of <img> tells which image to load? (a) width (b) height (c) alt (d) src
  30. 30.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="400">
    (a) map.png (b) Birthday cake (c) width (d) Map of India
  31. 31.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  32. 32.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to describe the image (c) to colour it (d) to load it faster
  33. 33.💬 Which text will NOT show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>Fun facts</p>
    <p>Our school trip</p>
    (a) Our school trip (b) Cricket is fun. (c) Fun facts
  34. 34.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
  35. 35.🔍 One closing tag is missing. Which one?
    <h2>Cricket is fun.</h2>
    <i>My pets
    <p>Fun facts</p>
    (a) </h2> (b) </b> (c) </i> (d) </p>
  36. 36.📋 What number does the browser show next to “Papaya”?
    <ol>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Litchi</li>
      <li>Orange</li>
    </ol>
  37. 37.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h6>? (a) <h6> (b) <h1> (c) <h2> (d) <h4>
  38. 38.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  39. 39.📋 Which list tag lists things in any order? (a) <li> (b) <ol> (c) <ul>
  40. 40.🏷️ Which is the closing tag for <strong>? (a) <strong> (b) </strong> (c) <\strong> (d) <strong/>

Answer key

  1. tiger.jpg
  2. School news
  3. False
  4. Yes
  5. Yes
  6. False
  7. </h3>
  8. an empty tag
  9. 350
  10. <b>
  11. My drawings
  12. Good morning!
  13. 3
  14. saves our .html files
  15. </body>
  16. 6
  17. False
  18. False
  19. HyperText
  20. Planets
  21. in a new tab
  22. opens it in a new tab
  23. False
  24. False
  25. 1
  26. opens web pages for us
  27. Fun facts
  28. 3
  29. src
  30. Map of India
  31. an opening tag
  32. to describe the image
  33. Cricket is fun.
  34. No
  35. </i>
  36. 2
  37. <h1>
  38. an opening tag
  39. <ul>
  40. </strong>

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