← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 734 · 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.🔗 Where does this link open?
    <a href="games.html" target="_blank">Contact us</a>
    (a) in the same tab (b) in a new tab
  2. 2.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <!-- <p>Good morning!</p> -->
    <p>Hello, world!</p>
    <p>The red kite</p>
    (a) My pets (b) Hello, world! (c) Good morning! (d) The red kite
  3. 3.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="50">
    (a) A happy dog (b) width (c) Birthday cake (d) cake.jpg
  4. 4.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) attribute (c) address (d) editor
  5. 5.📋 Does this list show bullets or numbers?
    <ul>
      <li>Grapes</li>
      <li>Papaya</li>
      <li>Guava</li>
    </ul>
    (a) bullets (b) numbers
  6. 6.📋 How many items does this list show?
    <ul>
      <li>Litchi</li>
      <li>Guava</li>
      <li>Orange</li>
      <li>Grapes</li>
      <li>Papaya</li>
    </ul>
  7. 7.True or false: in <img>, src names the picture file. (a) False (b) True
  8. 8.🔠 Which tag is the least important heading? (a) <h6> (b) <h3> (c) <p> (d) <h1>
  9. 9.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>Good morning!</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>My pets</p>
    (a) Good morning! (b) Cricket is fun. (c) My pets (d) The red kite
  10. 10.True or false: a code editor saves our .html files. (a) False (b) True
  11. 11.🔍 One closing tag is missing. Which one?
    <b>I love mangoes.</b>
    <small>Rain today
    <em>Fun facts</em>
    (a) </b> (b) </small> (c) </em> (d) </strong>
  12. 12.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) width (c) height (d) src
  13. 13.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Rivers flow<br>Birds sing<br>Sky is blue<br>Roses are red</p>
  14. 14.📝 What does <br> do? (a) makes text bold (b) adds a picture (c) makes a list (d) starts a new line
  15. 15.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h1> or <h3>? (a) <h2> (b) <h6> (c) <h1> (d) <h3>
  16. 16.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  17. 17.📋 How many items does this list show?
    <ol>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Mango</li>
    </ol>
  18. 18.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h3> or <h2>? (a) <h6> (b) <h1> (c) <h3> (d) <h2>
  19. 19.🔗 Which words do you click on?
    <a href="https://example.com">School news</a>
    (a) https://example.com (b) School news (c) Take the quiz (d) href
  20. 20.📋 Which list tag is one item of a list? (a) <ul> (b) <ol> (c) <li>
  21. 21.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="200">
    (a) cake.jpg (b) A red kite (c) map.png (d) kite.png
  22. 22.True or false: a web browser has an address bar. (a) True (b) False
  23. 23.🌐 Which one has an address bar? (a) a code editor (b) a web server (c) a web browser
  24. 24.📋 Which tag goes around each item of a list? (a) <ol> (b) <p> (c) <li> (d) <ul>
  25. 25.True or false: in <img>, src tells which image to load. (a) True (b) False
  26. 26.📋 Which list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <ul> (d) <br>
  27. 27.True or false: <img> goes in the head. (a) False (b) True
  28. 28.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Good morning!</p>
    <h3>Cricket is fun.</h3>
    <p>Hello, world!</p>
  29. 29.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a alt="about.html"> (c) <link about.html> (d) <a href="about.html">
  30. 30.💾 A web page file usually ends with which extension? (a) .png (b) .mp3 (c) .html (d) .txt
  31. 31.🔗 Which address opens when you click this link?
    <a href="https://example.com">Visit the site</a>
    (a) Visit the site (b) https://example.com (c) maths.html (d) art.html
  32. 32.📋 What number does the browser show next to “Banana”?
    <ol start="5">
      <li>Papaya</li>
      <li>Grapes</li>
      <li>Guava</li>
      <li>Jamun</li>
      <li>Banana</li>
    </ol>
  33. 33.True or false: in <img>, width sets how tall it is. (a) True (b) False
  34. 34.🔗 Where does this link open?
    <a href="contact.html">Art corner</a>
    (a) in the same tab (b) in a new tab
  35. 35.Which of these goes in the head? (a) <p> (b) <a> (c) <meta charset="utf-8"> (d) <h1>
  36. 36.True or false: <li> goes inside ul or ol. (a) True (b) False
  37. 37.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 10 (c) 1 (d) 6
  38. 38.True or false: HTML on its own can make headings. (a) False (b) True
  39. 39.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h2> or <h4>? (a) <h1> (b) <h2> (c) <h3> (d) <h4>
  40. 40.🔗 Which address opens when you click this link?
    <a href="maths.html">School news</a>
    (a) maths.html (b) School news (c) news.html (d) art.html

Answer key

  1. in a new tab
  2. Good morning!
  3. Birthday cake
  4. element
  5. bullets
  6. 5
  7. True
  8. <h6>
  9. Cricket is fun.
  10. True
  11. </small>
  12. alt
  13. 5
  14. starts a new line
  15. <h6>
  16. Yes
  17. 5
  18. <h6>
  19. School news
  20. <li>
  21. kite.png
  22. True
  23. a web browser
  24. <li>
  25. True
  26. <ul>
  27. False
  28. 2
  29. <a href="about.html">
  30. .html
  31. https://example.com
  32. 9
  33. False
  34. in the same tab
  35. <meta charset="utf-8">
  36. True
  37. 1
  38. True
  39. <h4>
  40. maths.html

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