← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 933 · 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 heading shows the SMALLEST text: <h1>, <h2>, <h4> or <h3>? (a) <h2> (b) <h4> (c) <h1> (d) <h3>
  2. 2.🔗 Which attribute holds the address of a link? (a) id (b) href (c) src (d) alt
  3. 3.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="250">
    (a) Map of India (b) map.png (c) cake.jpg (d) dog.jpg
  4. 4.True or false: <ul> is an unordered list. (a) True (b) False
  5. 5.True or false: <img> has a closing tag. (a) False (b) True
  6. 6.📝 What does <hr> draw? (a) a table (b) a picture (c) a link (d) a line across the page
  7. 7.📝 What do we need to write HTML? (a) a paintbrush (b) a microphone (c) a printer (d) a plain text editor
  8. 8.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  9. 9.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
  10. 10.Which of these is an empty tag? (a) <b> (b) <li> (c) <input> (d) <title>
  11. 11.🖼️ Which attribute of <img> names the picture file? (a) height (b) src (c) alt (d) width
  12. 12.Which of these is a closing tag? (a) <h1> (b) <body> (c) </p> (d) <title>
  13. 13.📄 Can HTML on its own make links to pages? (a) Yes (b) No
  14. 14.📋 How many items does this list show?
    <ol>
      <li>Guava</li>
      <li>Papaya</li>
      <li>Mango</li>
      <li>Grapes</li>
    </ol>
  15. 15.True or false: a web browser shows pages from the web. (a) False (b) True
  16. 16.True or false: in <img>, height shows if the image fails. (a) True (b) False
  17. 17.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) height (c) width (d) src
  18. 18.🔍 One closing tag is missing. Which one?
    <u>Good morning!
    <h2>The red kite</h2>
    <h3>Fun facts</h3>
    (a) </small> (b) </h3> (c) </u> (d) </h2>
  19. 19.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <link rel="stylesheet"> (c) <style> (d) <h1>
  20. 20.Which of these has a closing tag? (a) <ul> (b) <br> (c) <input> (d) <meta>
  21. 21.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <p>Hello, world!</p>
    <p>My pets</p>
    <p>The red kite</p>
    <!-- <p>Rain today</p> -->
  22. 22.🖼️ Which attribute of <img> tells which image to load? (a) width (b) height (c) src (d) alt
  23. 23.🔗 Where does this link open?
    <a href="news.html">Visit the site</a>
    (a) in a new tab (b) in the same tab
  24. 24.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  25. 25.🖼️ Which tag puts a picture on a page? (a) <img> (b) <pic> (c) <p> (d) <a>
  26. 26.🔢 In a basic web page file, which comes first: “</head>” or “</html>”? (a) </head> (b) </html>
  27. 27.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="200">
  28. 28.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h2>Hello, world!</h2>
    <h3>Cricket is fun.</h3>
  29. 29.True or false: <li> is one item of a list. (a) False (b) True
  30. 30.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  31. 31.📄 What is the first line of an HTML5 page? (a) <head> (b) <!DOCTYPE html> (c) <html> (d) <body>
  32. 32.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>My best friend</p> -->
    <p>Good morning!</p>
    <!-- <p>Our school trip</p> -->
  33. 33.True or false: a code editor shows pages from the web. (a) True (b) False
  34. 34.🔍 Which line is missing its closing tag?
    line 1: <em>Rain today
    line 2: <i>Fun facts</i>
    line 3: <h3>I love mangoes.</h3>
    (a) line 2 (b) line 1 (c) line 3
  35. 35.True or false: <title> goes in the head. (a) True (b) False
  36. 36.📋 Does this list show bullets or numbers?
    <ul>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Papaya</li>
    </ul>
    (a) bullets (b) numbers
  37. 37.📝 What does <p> make? (a) a picture (b) a table (c) a link (d) a paragraph
  38. 38.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Hello, world!</p>
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>Our school trip</p> -->
    <p>My pets</p>
  39. 39.🔗 Which address opens when you click this link?
    <a href="contact.html">Contact us</a>
    (a) maths.html (b) https://example.com (c) Contact us (d) contact.html
  40. 40.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a alt="about.html"> (c) <a src="about.html"> (d) <link about.html>

Answer key

  1. <h4>
  2. href
  3. map.png
  4. True
  5. False
  6. a line across the page
  7. a plain text editor
  8. has a closing tag
  9. Yes
  10. <input>
  11. src
  12. </p>
  13. Yes
  14. 4
  15. True
  16. False
  17. width
  18. </u>
  19. <h1>
  20. <ul>
  21. 4
  22. src
  23. in the same tab
  24. Yes
  25. <img>
  26. </head>
  27. 200
  28. 3
  29. True
  30. has a closing tag
  31. <!DOCTYPE html>
  32. 1
  33. False
  34. line 1
  35. True
  36. bullets
  37. a paragraph
  38. 2
  39. contact.html
  40. <a href="about.html">

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