← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 149 · 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 words do you click on?
    <a href="contact.html">Maths fun</a>
    (a) href (b) Art corner (c) Maths fun (d) contact.html
  2. 2.True or false: a web browser shows pages from the web. (a) False (b) True
  3. 3.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <p> (c) <img> (d) <a>
  4. 4.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  5. 5.🖼️ Which attribute of <img> describes the picture? (a) width (b) src (c) alt (d) height
  6. 6.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) id (d) href
  7. 7.🔗 Which words do you click on?
    <a href="games.html">Art corner</a>
    (a) href (b) games.html (c) School news (d) Art corner
  8. 8.🔗 Which tag makes a clickable link? (a) <a> (b) <link> (c) <img> (d) <p>
  9. 9.🔍 Which line is missing its closing tag?
    line 1: <b>Good morning!</b>
    line 2: <h3>Our school trip
    line 3: <strong>Cricket is fun.</strong>
    (a) line 1 (b) line 3 (c) line 2
  10. 10.🏷️ HTML marks up text using ___. (a) keys (b) wires (c) pixels (d) tags
  11. 11.🔗 Which words do you click on?
    <a href="quiz.html">Play games</a>
    (a) href (b) Play games (c) quiz.html (d) About us
  12. 12.🌐 Which one shows pages from the web? (a) a web server (b) a web browser (c) a code editor
  13. 13.🔍 Which is the odd one out? (a) shows line numbers (b) answers page requests (c) hosts websites online (d) sends pages over the net
  14. 14.🔍 One closing tag is missing. Which one?
    <h1>Our school trip</h1>
    <small>Good morning!</small>
    <b>Cricket is fun.
    (a) </b> (b) </p> (c) </small> (d) </h1>
  15. 15.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) width (c) alt (d) src
  16. 16.📋 How many items does this list show?
    <ul>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Mango</li>
      <li>Banana</li>
      <li>Guava</li>
    </ul>
  17. 17.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <br> (c) <ol> (d) <ul>
  18. 18.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
  19. 19.🔗 Where does this link open?
    <a href="quiz.html">Play games</a>
    (a) in a new tab (b) in the same tab
  20. 20.🔠 Are headings shown in bold by default? (a) No (b) Yes
  21. 21.True or false: <title> is an empty tag. (a) True (b) False
  22. 22.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  23. 23.True or false: in <img>, alt describes the picture. (a) True (b) False
  24. 24.True or false: <ul> goes in the head. (a) True (b) False
  25. 25.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="250">
    (a) cake.jpg (b) kite.png (c) map.png (d) A red kite
  26. 26.True or false: <li> lists steps in order. (a) False (b) True
  27. 27.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>Cricket is fun.</p>
    <h3>Our school trip</h3>
  28. 28.🏷️ Which is the closing tag for <h1>? (a) <\h1> (b) <h1> (c) <h1/> (d) </h1>
  29. 29.🔍 One closing tag is missing. Which one?
    <small>Cricket is fun.</small>
    <strong>I love mangoes.
    <p>Rain today</p>
    (a) </strong> (b) </h3> (c) </small> (d) </p>
  30. 30.📋 Which list tag lists things in any order? (a) <ul> (b) <ol> (c) <li>
  31. 31.Which of these is an empty tag? (a) <title> (b) <h1> (c) <br> (d) <li>
  32. 32.🔠 How many heading levels does HTML have? (a) 6 (b) 3 (c) 10 (d) 4
  33. 33.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as a new line (c) as one space (d) as 5 spaces
  34. 34.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h5> or <h4>? (a) <h5> (b) <h4> (c) <h1> (d) <h3>
  35. 35.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>Good morning!</p> -->
    <!-- <p>I love mangoes.</p> -->
    <p>My best friend</p>
  36. 36.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
  37. 37.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  38. 38.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <h2>Fun facts</h2>
    <h2>Rain today</h2>
    <p>Good morning!</p>
    <p>The red kite</p>
  39. 39.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="300">
    (a) width (b) The full moon (c) Our school bus (d) moon.png
  40. 40.Which of these has a closing tag? (a) <meta> (b) <br> (c) <input> (d) <title>

Answer key

  1. Maths fun
  2. True
  3. <img>
  4. No
  5. alt
  6. href
  7. Art corner
  8. <a>
  9. line 2
  10. tags
  11. Play games
  12. a web browser
  13. shows line numbers
  14. </b>
  15. alt
  16. 6
  17. <ol>
  18. in the body
  19. in the same tab
  20. Yes
  21. False
  22. in the head
  23. True
  24. False
  25. kite.png
  26. False
  27. 2
  28. </h1>
  29. </strong>
  30. <ul>
  31. <br>
  32. 6
  33. as one space
  34. <h5>
  35. 1
  36. No
  37. has a closing tag
  38. 3
  39. The full moon
  40. <title>

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