← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 902 · 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 of these has a closing tag? (a) <meta> (b) <input> (c) <title> (d) <img>
  2. 2.🔍 Which is the odd one out? (a) saves our .html files (b) opens web pages for us (c) shows line numbers (d) is where we type code
  3. 3.🔗 Which tag makes a clickable link? (a) <img> (b) <p> (c) <link> (d) <a>
  4. 4.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <ol> (d) <hr>
  5. 5.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Kites fly high<br>Roses are red<br>Stars shine</p>
  6. 6.📛 In <a href="x.html">, what is href? (a) an element name (b) an attribute (c) a closing tag (d) a comment
  7. 7.🔗 Which address opens when you click this link?
    <a href="quiz.html">Art corner</a>
    (a) games.html (b) quiz.html (c) about.html (d) Art corner
  8. 8.📄 What is the first line of an HTML5 page? (a) <html> (b) <!DOCTYPE html> (c) <head> (d) <body>
  9. 9.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to add colour (d) to make links
  10. 10.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h2> or <h1>? (a) <h3> (b) <h2> (c) <h4> (d) <h1>
  11. 11.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a dot . (c) a slash / (d) a hash #
  12. 12.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  13. 13.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) width (c) height (d) alt
  14. 14.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
  15. 15.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h3> or <h6>? (a) <h5> (b) <h6> (c) <h3> (d) <h1>
  16. 16.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>Good morning!</p> -->
    <!-- <p>Rain today</p> -->
    <!-- <p>Hello, world!</p> -->
  17. 17.📋 Which list tag is an unordered list? (a) <li> (b) <ul> (c) <ol>
  18. 18.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="250">
  19. 19.🔍 Which is the odd one out? (a) has an address bar (b) saves our .html files (c) is where we type code (d) colours code to help us
  20. 20.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
    <p>I love mangoes.</p>
    <h2>Cricket is fun.</h2>
    <p>Rain today</p>
  21. 21.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
    <h2>Good morning!</h2>
  22. 22.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <p>Fun facts</p>
    <!-- <p>Good morning!</p> -->
  23. 23.📝 What does <hr> draw? (a) a link (b) a table (c) a picture (d) a line across the page
  24. 24.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h2> or <h5>? (a) <h3> (b) <h4> (c) <h2> (d) <h5>
  25. 25.📋 What number does the browser show next to “Guava”?
    <ol start="6">
      <li>Grapes</li>
      <li>Banana</li>
      <li>Guava</li>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Mango</li>
    </ol>
  26. 26.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <p>I love mangoes.</p>
    <!-- <p>Our school trip</p> -->
    (a) Cricket is fun. (b) I love mangoes. (c) Our school trip
  27. 27.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h3> or <h4>? (a) <h5> (b) <h1> (c) <h4> (d) <h3>
  28. 28.🔗 Which words do you click on?
    <a href="https://example.com">About us</a>
    (a) https://example.com (b) href (c) Contact us (d) About us
  29. 29.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>The red kite</p>
    <!-- <p>My best friend</p> -->
    (a) I love mangoes. (b) My best friend (c) The red kite
  30. 30.True or false: <link rel="stylesheet"> goes in the body. (a) True (b) False
  31. 31.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
  32. 32.Which of these is true of a web server? (a) shows pages from the web (b) stores a website’s files (c) saves our .html files (d) is where we type code
  33. 33.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h3> or <h2>? (a) <h2> (b) <h4> (c) <h3> (d) <h6>
  34. 34.💬 Does the browser show comments on the page? (a) Yes (b) No
  35. 35.True or false: in <img>, height sets how tall it is. (a) True (b) False
  36. 36.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h3>The red kite</h3>
    <h2>Hello, world!</h2>
    <p>Good morning!</p>
    <h2>Our school trip</h2>
  37. 37.🖼️ Which attribute of <img> describes the picture? (a) width (b) alt (c) src (d) height
  38. 38.True or false: <ul> is an unordered list. (a) False (b) True
  39. 39.📋 What number does the browser show next to “Jamun”?
    <ol>
      <li>Mango</li>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Orange</li>
      <li>Guava</li>
      <li>Banana</li>
    </ol>
  40. 40.🔍 Which is the odd one out? (a) has an address bar (b) opens web pages for us (c) shows pages from the web (d) answers page requests

Answer key

  1. <title>
  2. opens web pages for us
  3. <a>
  4. <ol>
  5. 4
  6. an attribute
  7. quiz.html
  8. <!DOCTYPE html>
  9. to leave notes
  10. <h1>
  11. a slash /
  12. Yes
  13. alt
  14. in the head
  15. <h6>
  16. 1
  17. <ul>
  18. 250
  19. has an address bar
  20. 4
  21. 2
  22. 1
  23. a line across the page
  24. <h5>
  25. 8
  26. Our school trip
  27. <h1>
  28. About us
  29. My best friend
  30. False
  31. Yes
  32. stores a website’s files
  33. <h2>
  34. No
  35. True
  36. 4
  37. alt
  38. True
  39. 2
  40. answers page requests

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