← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 628 · 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="contact.html" target="_blank">Play games</a>
    (a) in a new tab (b) in the same tab
  2. 2.📄 Can HTML on its own make links to pages? (a) Yes (b) No
  3. 3.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>Hello, world!</p>
    <p>My best friend</p>
  4. 4.Which of these is an opening tag? (a) </li> (b) </h1> (c) <h1> (d) </p>
  5. 5.💬 How does an HTML comment end? (a) // (b) >> (c) --> (d) */
  6. 6.Which of these has a closing tag? (a) <b> (b) <hr> (c) <br> (d) <input>
  7. 7.Which of these has a closing tag? (a) <meta> (b) <ul> (c) <input> (d) <img>
  8. 8.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <p>I love mangoes.</p>
    <p>My pets</p>
    <p>My best friend</p>
    <!-- <p>Hello, world!</p> -->
  9. 9.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="300">
    (a) fort.jpg (b) tiger.jpg (c) kite.png (d) An old fort
  10. 10.True or false: a web browser opens web pages for us. (a) False (b) True
  11. 11.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) <h1/> (c) </h1> (d) <\h1>
  12. 12.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h6> (c) <br> (d) <h1>
  13. 13.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="200">
    (a) width (b) Birthday cake (c) Map of India (d) map.png
  14. 14.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="350">
  15. 15.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="300">
    (a) dog.jpg (b) bus.jpg (c) A happy dog (d) moon.png
  16. 16.🔗 Which words do you click on?
    <a href="news.html">Maths fun</a>
    (a) Art corner (b) href (c) news.html (d) Maths fun
  17. 17.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ul> (c) <ol>
  18. 18.🔗 Which address opens when you click this link?
    <a href="contact.html">Maths fun</a>
    (a) https://example.com (b) contact.html (c) maths.html (d) Maths fun
  19. 19.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
  20. 20.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
  21. 21.💬 Which text will NOT show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Cricket is fun.</p>
    <p>The red kite</p>
    <p>Our school trip</p>
    (a) Cricket is fun. (b) The red kite (c) Our school trip (d) I love mangoes.
  22. 22.True or false: <ul> goes in the body. (a) False (b) True
  23. 23.🔍 Which is the odd one out? (a) shows pages from the web (b) opens web pages for us (c) shows line numbers (d) turns HTML into a page
  24. 24.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <hr> (d) <ol>
  25. 25.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>My pets</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>Our school trip</p>
    (a) Our school trip (b) Cricket is fun. (c) My pets (d) I love mangoes.
  26. 26.Which of these goes in the body? (a) <title> (b) <link rel="stylesheet"> (c) <h1> (d) <meta charset="utf-8">
  27. 27.🏷️ Every HTML tag starts with which sign? (a) < (b) ( (c) { (d) [
  28. 28.True or false: <ul> goes in the head. (a) True (b) False
  29. 29.True or false: <ol> lists steps in order. (a) False (b) True
  30. 30.True or false: in <img>, src is read by screen readers. (a) False (b) True
  31. 31.🔤 In “HTML”, what do the letters HT stand for? (a) High Tech (b) HyperText (c) Home Text (d) Hot Tags
  32. 32.True or false: <li> is an unordered list. (a) False (b) True
  33. 33.📄 Can HTML on its own make headings? (a) Yes (b) No
  34. 34.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h3>Hello, world!</h3>
    <p>Cricket is fun.</p>
    <p>My pets</p>
  35. 35.True or false: <img> has a closing tag. (a) True (b) False
  36. 36.🖼️ Which attribute of <img> names the picture file? (a) alt (b) src (c) width (d) height
  37. 37.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
  38. 38.🏷️ Which is the closing tag for <strong>? (a) </strong> (b) <strong/> (c) <strong> (d) <\strong>
  39. 39.📄 Can HTML on its own keep a high score? (a) No (b) Yes
  40. 40.🔗 Which words do you click on?
    <a href="news.html">Contact us</a>
    (a) Visit the site (b) href (c) news.html (d) Contact us

Answer key

  1. in a new tab
  2. Yes
  3. 3
  4. <h1>
  5. -->
  6. <b>
  7. <ul>
  8. 4
  9. fort.jpg
  10. True
  11. </h1>
  12. <h1>
  13. Map of India
  14. 350
  15. dog.jpg
  16. Maths fun
  17. <ol>
  18. contact.html
  19. in the body
  20. in the head
  21. I love mangoes.
  22. True
  23. shows line numbers
  24. <ol>
  25. Cricket is fun.
  26. <h1>
  27. <
  28. False
  29. True
  30. False
  31. HyperText
  32. False
  33. Yes
  34. 2
  35. False
  36. src
  37. in the head
  38. </strong>
  39. No
  40. Contact us

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