← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 459 · 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 is an empty tag? (a) <h1> (b) <input> (c) <b> (d) <ul>
  2. 2.📋 What number does the browser show next to “Mango”?
    <ol start="2">
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Mango</li>
    </ol>
  3. 3.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to colour it (c) to describe the image (d) to load it faster
  4. 4.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="250">
    (a) width (b) An old fort (c) Our school bus (d) bus.jpg
  5. 5.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  6. 6.🔍 One closing tag is missing. Which one?
    <h2>Fun facts</h2>
    <strong>The red kite
    <small>Rain today</small>
    (a) </h3> (b) </small> (c) </strong> (d) </h2>
  7. 7.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Stars shine</p>
  8. 8.🌐 Which one has an address bar? (a) a code editor (b) a web server (c) a web browser
  9. 9.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="100">
    (a) cake.jpg (b) A red kite (c) map.png (d) kite.png
  10. 10.📝 Does <hr> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  11. 11.🔗 Which attribute holds the address of a link? (a) src (b) href (c) id (d) alt
  12. 12.💬 How does an HTML comment start? (a) # (b) // (c) /* (d) <!--
  13. 13.📛 In <a href="x.html">, what is href? (a) an element name (b) an attribute (c) a closing tag (d) a comment
  14. 14.📋 What number does the browser show next to “Banana”?
    <ol>
      <li>Papaya</li>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Banana</li>
    </ol>
  15. 15.🔗 Which address opens when you click this link?
    <a href="games.html">Art corner</a>
    (a) Art corner (b) contact.html (c) games.html (d) about.html
  16. 16.Which of these is true of a code editor? (a) colours code to help us (b) sends pages over the net (c) answers page requests (d) hosts websites online
  17. 17.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  18. 18.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) src (c) height (d) width
  19. 19.📋 Which list tag shows bullet points? (a) <li> (b) <ul> (c) <ol>
  20. 20.True or false: HTML on its own can pick a random number. (a) False (b) True
  21. 21.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Birds sing</p>
  22. 22.🏷️ Which is the closing tag for <small>? (a) <small> (b) <small/> (c) <\small> (d) </small>
  23. 23.🔍 Which is the odd one out? (a) answers page requests (b) stores a website’s files (c) sends pages over the net (d) has an address bar
  24. 24.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>My pets</p>
    <p>Cricket is fun.</p>
    <!-- <p>Hello, world!</p> -->
    (a) My pets (b) Cricket is fun. (c) Good morning! (d) Hello, world!
  25. 25.📄 Where does the text of <title> appear? (a) nowhere (b) in a big heading (c) on the browser tab (d) at the bottom
  26. 26.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>Hello, world!</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>I love mangoes.</p>
    (a) I love mangoes. (b) Fun facts (c) Hello, world! (d) Cricket is fun.
  27. 27.True or false: a web server colours code to help us. (a) True (b) False
  28. 28.Which of these is true of a code editor? (a) opens web pages for us (b) shows line numbers (c) hosts websites online (d) shows pages from the web
  29. 29.🔗 Which words do you click on?
    <a href="art.html">Art corner</a>
    (a) School news (b) Art corner (c) art.html (d) href
  30. 30.📋 Which list suits a shopping list in any order? (a) <ul> (b) <hr> (c) <br> (d) <ol>
  31. 31.🔠 Are headings shown in bold by default? (a) No (b) Yes
  32. 32.🔗 Where does this link open?
    <a href="maths.html">Play games</a>
    (a) in a new tab (b) in the same tab
  33. 33.🔗 Where does this link open?
    <a href="quiz.html" target="_blank">Maths fun</a>
    (a) in the same tab (b) in a new tab
  34. 34.🔗 Where does this link open?
    <a href="news.html">About us</a>
    (a) in a new tab (b) in the same tab
  35. 35.📄 Can HTML on its own count button clicks? (a) Yes (b) No
  36. 36.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <h2>Rain today</h2>
    <p>The red kite</p>
    <h2>My best friend</h2>
    <p>Fun facts</p>
  37. 37.True or false: <li> is an empty tag. (a) True (b) False
  38. 38.🔍 Which line is missing its closing tag?
    line 1: <h3>Fun facts</h3>
    line 2: <u>The red kite
    line 3: <p>I love mangoes.</p>
    (a) line 1 (b) line 3 (c) line 2
  39. 39.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="200">
    (a) dog.jpg (b) Birthday cake (c) moon.png (d) cake.jpg
  40. 40.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) </h1> (c) <h1/> (d) <\h1>

Answer key

  1. <input>
  2. 5
  3. to describe the image
  4. Our school bus
  5. has a closing tag
  6. </strong>
  7. 2
  8. a web browser
  9. kite.png
  10. an empty tag
  11. href
  12. <!--
  13. an attribute
  14. 4
  15. games.html
  16. colours code to help us
  17. has a closing tag
  18. src
  19. <ul>
  20. False
  21. 2
  22. </small>
  23. has an address bar
  24. Hello, world!
  25. on the browser tab
  26. Cricket is fun.
  27. False
  28. shows line numbers
  29. Art corner
  30. <ul>
  31. Yes
  32. in the same tab
  33. in a new tab
  34. in the same tab
  35. No
  36. 3
  37. False
  38. line 2
  39. cake.jpg
  40. </h1>

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