← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 350 · 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 BIGGEST text: <h6>, <h4>, <h3> or <h1>? (a) <h3> (b) <h6> (c) <h4> (d) <h1>
  2. 2.🖼️ Which attribute of <img> names the picture file? (a) width (b) height (c) alt (d) src
  3. 3.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an element name (c) an attribute (d) a comment
  4. 4.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Sky is blue<br>Rivers flow</p>
  5. 5.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) height (c) width (d) src
  6. 6.🖼️ Which attribute of <img> describes the picture? (a) width (b) src (c) height (d) alt
  7. 7.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  8. 8.🔗 Which tag makes a clickable link? (a) <img> (b) <p> (c) <link> (d) <a>
  9. 9.Which of these has a closing tag? (a) <img> (b) <br> (c) <meta> (d) <li>
  10. 10.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="200">
    (a) Birthday cake (b) dog.jpg (c) cake.jpg (d) moon.png
  11. 11.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <hr> (c) <ul> (d) <br>
  12. 12.🌐 Which one stores a website’s files? (a) a web browser (b) a web server (c) a code editor
  13. 13.True or false: a code editor stores a website’s files. (a) True (b) False
  14. 14.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h3> or <h4>? (a) <h1> (b) <h3> (c) <h6> (d) <h4>
  15. 15.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="400">
    (a) width (b) A happy dog (c) dog.jpg (d) The full moon
  16. 16.Which of these is true of a code editor? (a) sends pages over the net (b) hosts websites online (c) turns HTML into a page (d) is where we type code
  17. 17.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to colour it (c) to make it bigger (d) to describe the image
  18. 18.📋 How many items does this list show?
    <ul>
      <li>Guava</li>
      <li>Mango</li>
      <li>Papaya</li>
    </ul>
  19. 19.📋 What number does the browser show next to “Jamun”?
    <ol>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Papaya</li>
    </ol>
  20. 20.🔗 Where does this link open?
    <a href="art.html" target="_blank">Contact us</a>
    (a) in a new tab (b) in the same tab
  21. 21.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Roses are red<br>Stars shine<br>Sky is blue</p>
  22. 22.🔗 What does HyperText mean? (a) text in colour (b) secret text (c) text with links (d) very big text
  23. 23.💬 Why do coders write comments? (a) to make links (b) to add colour (c) to leave notes (d) to show pictures
  24. 24.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="150">
    (a) bus.jpg (b) tiger.jpg (c) fort.jpg (d) Our school bus
  25. 25.🔍 One closing tag is missing. Which one?
    <i>Hello, world!
    <em>Cricket is fun.</em>
    <h3>Rain today</h3>
    (a) </i> (b) </em> (c) </h3> (d) </h1>
  26. 26.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <p>Cricket is fun.</p>
    <h2>I love mangoes.</h2>
    <h3>Good morning!</h3>
  27. 27.📋 Which list tag shows bullet points? (a) <li> (b) <ul> (c) <ol>
  28. 28.💬 Does the browser show comments on the page? (a) No (b) Yes
  29. 29.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Grapes</li>
      <li>Banana</li>
    </ol>
  30. 30.📝 What does <br> do? (a) makes text bold (b) starts a new line (c) makes a list (d) adds a picture
  31. 31.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it blank (d) makes it bold
  32. 32.True or false: <style> goes in the head. (a) False (b) True
  33. 33.True or false: <li> is an ordered list. (a) True (b) False
  34. 34.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h4> or <h6>? (a) <h4> (b) <h5> (c) <h6> (d) <h1>
  35. 35.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>My pets</p>
    <p>I love mangoes.</p>
    (a) My pets (b) I love mangoes. (c) Rain today
  36. 36.🔢 In a basic web page file, which comes first: “</head>” or “<body>”? (a) </head> (b) <body>
  37. 37.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <p>The red kite</p>
    <p>Our school trip</p>
    <!-- <p>Good morning!</p> -->
  38. 38.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <p>Good morning!</p>
    <!-- <p>Rain today</p> -->
  39. 39.🖼️ Which attribute of <img> sets how tall it is? (a) height (b) src (c) alt (d) width
  40. 40.True or false: HTML on its own can make links to pages. (a) True (b) False

Answer key

  1. <h1>
  2. src
  3. an attribute
  4. 3
  5. src
  6. alt
  7. has a closing tag
  8. <a>
  9. <li>
  10. cake.jpg
  11. <ol>
  12. a web server
  13. False
  14. <h1>
  15. A happy dog
  16. is where we type code
  17. to describe the image
  18. 3
  19. 2
  20. in a new tab
  21. 4
  22. text with links
  23. to leave notes
  24. bus.jpg
  25. </i>
  26. 3
  27. <ul>
  28. No
  29. 5
  30. starts a new line
  31. opens it in a new tab
  32. True
  33. False
  34. <h1>
  35. Rain today
  36. </head>
  37. 3
  38. 2
  39. height
  40. True

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