← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 907 · 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.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  2. 2.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <!-- <p>Hello, world!</p> -->
    <p>I love mangoes.</p>
  3. 3.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="100">
  4. 4.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  5. 5.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h4> or <h2>? (a) <h4> (b) <h2> (c) <h6> (d) <h1>
  6. 6.💬 Why do coders write comments? (a) to make links (b) to leave notes (c) to show pictures (d) to add colour
  7. 7.Which of these is an opening tag? (a) <title> (b) </p> (c) </li> (d) </title>
  8. 8.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <!-- <p>Our school trip</p> -->
    <p>My best friend</p>
    <p>Rain today</p>
    (a) My best friend (b) Our school trip (c) Hello, world! (d) Rain today
  9. 9.Which of these is an opening tag? (a) <body> (b) </h1> (c) </li> (d) </title>
  10. 10.Which of these goes in the body? (a) <title> (b) <meta charset="utf-8"> (c) <link rel="stylesheet"> (d) <img>
  11. 11.🔍 One closing tag is missing. Which one?
    <strong>Rain today
    <h3>Our school trip</h3>
    <em>The red kite</em>
    (a) </h3> (b) </em> (c) </strong> (d) </h2>
  12. 12.🔗 Which words do you click on?
    <a href="news.html">Contact us</a>
    (a) Visit the site (b) news.html (c) Contact us (d) href
  13. 13.📄 Can HTML on its own make headings? (a) Yes (b) No
  14. 14.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="50">
    (a) An old fort (b) fort.jpg (c) A tiger asleep (d) width
  15. 15.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h3> or <h1>? (a) <h3> (b) <h1> (c) <h6> (d) <h2>
  16. 16.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Cricket Club (b) body (c) Planets (d) Try this poha.
  17. 17.True or false: in <img>, height tells which image to load. (a) False (b) True
  18. 18.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <h2>My best friend</h2>
    <p>Rain today</p>
    <h2>Our school trip</h2>
    <h2>Cricket is fun.</h2>
  19. 19.True or false: <hr> is an empty tag. (a) False (b) True
  20. 20.📋 How many items does this list show?
    <ol>
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Grapes</li>
    </ol>
  21. 21.🖼️ Which attribute of <img> names the picture file? (a) height (b) alt (c) src (d) width
  22. 22.📄 Where does the text of <title> appear? (a) in a big heading (b) on the browser tab (c) nowhere (d) at the bottom
  23. 23.🖼️ Which attribute of <img> is read by screen readers? (a) width (b) src (c) height (d) alt
  24. 24.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h2> or <h5>? (a) <h2> (b) <h3> (c) <h1> (d) <h5>
  25. 25.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <br> (d) <ol>
  26. 26.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Birds sing<br>Sky is blue<br>Roses are red</p>
  27. 27.🔍 One closing tag is missing. Which one?
    <h1>Good morning!
    <em>The red kite</em>
    <strong>My best friend</strong>
    (a) </em> (b) </h1> (c) </h2> (d) </strong>
  28. 28.🔠 Which tag is the least important heading? (a) <p> (b) <h3> (c) <h1> (d) <h6>
  29. 29.💬 How does an HTML comment end? (a) */ (b) >> (c) // (d) -->
  30. 30.🔍 Which is the odd one out? (a) shows pages from the web (b) hosts websites online (c) has an address bar (d) opens web pages for us
  31. 31.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  32. 32.🔠 How many heading levels does HTML have? (a) 10 (b) 4 (c) 3 (d) 6
  33. 33.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="100">
    (a) width (b) An old fort (c) Our school bus (d) bus.jpg
  34. 34.🔤 In “HTML”, what does the M stand for? (a) Mouse (b) Markup (c) Modern (d) Machine
  35. 35.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) makes it blank (d) opens it in a new tab
  36. 36.🔗 Which address opens when you click this link?
    <a href="about.html">Art corner</a>
    (a) https://example.com (b) about.html (c) Art corner (d) contact.html
  37. 37.📝 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
  38. 38.📝 What does <p> make? (a) a picture (b) a link (c) a table (d) a paragraph
  39. 39.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <p>My pets</p>
    <!-- <p>Cricket is fun.</p> -->
  40. 40.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>Our school trip</p>
    <p>Rain today</p>
    <p>My pets</p>
    <p>Rain today</p>
    <h2>I love mangoes.</h2>

Answer key

  1. has a closing tag
  2. 1
  3. 100
  4. an empty tag
  5. <h6>
  6. to leave notes
  7. <title>
  8. Our school trip
  9. <body>
  10. <img>
  11. </strong>
  12. Contact us
  13. Yes
  14. An old fort
  15. <h1>
  16. Planets
  17. False
  18. 2
  19. True
  20. 4
  21. src
  22. on the browser tab
  23. alt
  24. <h5>
  25. <ol>
  26. 4
  27. </h1>
  28. <h6>
  29. -->
  30. hosts websites online
  31. has a closing tag
  32. 6
  33. Our school bus
  34. Markup
  35. opens it in a new tab
  36. about.html
  37. as one space
  38. a paragraph
  39. 1
  40. 5

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