← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 153 · 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 tag is the least important heading? (a) <h3> (b) <h6> (c) <p> (d) <h1>
  2. 2.True or false: in <img>, src sets how tall it is. (a) True (b) False
  3. 3.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <img> (d) <a>
  4. 4.🔍 Which is the odd one out? (a) colours code to help us (b) is where we type code (c) hosts websites online (d) shows line numbers
  5. 5.Which of these goes in the body? (a) <table> (b) <title> (c) <style> (d) <link rel="stylesheet">
  6. 6.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  7. 7.📋 How many items does this list show?
    <ul>
      <li>Grapes</li>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Banana</li>
      <li>Jamun</li>
    </ul>
  8. 8.Which of these is true of a web server? (a) shows line numbers (b) is where we type code (c) colours code to help us (d) answers page requests
  9. 9.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="250">
    (a) An old fort (b) width (c) A tiger asleep (d) fort.jpg
  10. 10.🖼️ Which attribute of <img> tells which image to load? (a) width (b) src (c) height (d) alt
  11. 11.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <!-- <p>Fun facts</p> -->
    <!-- <p>I love mangoes.</p> -->
    <p>The red kite</p>
  12. 12.📋 How many items does this list show?
    <ol>
      <li>Guava</li>
      <li>Mango</li>
      <li>Orange</li>
      <li>Banana</li>
    </ol>
  13. 13.Which of these is true of a web browser? (a) has an address bar (b) stores a website’s files (c) saves our .html files (d) hosts websites online
  14. 14.Which of these is an opening tag? (a) </b> (b) </li> (c) <li> (d) </p>
  15. 15.🔍 Which line is missing its closing tag?
    line 1: <small>Rain today
    line 2: <i>Our school trip</i>
    line 3: <b>My pets</b>
    (a) line 2 (b) line 3 (c) line 1
  16. 16.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  17. 17.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) src (c) alt (d) width
  18. 18.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Space Facts (b) index.html (c) I like to read. (d) Planets
  19. 19.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>My best friend</p>
    <p>The red kite</p>
    <h4>Fun facts</h4>
  20. 20.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <!-- <p>The red kite</p> -->
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    <!-- <p>Cricket is fun.</p> -->
  21. 21.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <!-- <p>Good morning!</p> -->
    <p>My best friend</p>
    (a) Our school trip (b) Good morning! (c) My best friend
  22. 22.🔠 Which heading shows the SMALLEST text: <h5>, <h3>, <h2> or <h4>? (a) <h4> (b) <h3> (c) <h2> (d) <h5>
  23. 23.🔠 Which heading shows the SMALLEST text: <h6>, <h5>, <h4> or <h2>? (a) <h5> (b) <h4> (c) <h6> (d) <h2>
  24. 24.🔗 Which words do you click on?
    <a href="art.html">Take the quiz</a>
    (a) Take the quiz (b) art.html (c) href (d) Play games
  25. 25.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Welcome! (b) body (c) My Hobbies (d) I like to read.
  26. 26.🖼️ Which attribute of <img> describes the picture? (a) src (b) height (c) width (d) alt
  27. 27.🌐 Which one stores a website’s files? (a) a web server (b) a code editor (c) a web browser
  28. 28.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Sky is blue</p>
  29. 29.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Easy snacks (b) body (c) Art Gallery (d) Thanks for visiting.
  30. 30.📋 Which list tag is an ordered list? (a) <li> (b) <ul> (c) <ol>
  31. 31.💬 Which text will NOT show on the page?
    <!-- <p>Good morning!</p> -->
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
    (a) Cricket is fun. (b) Good morning! (c) I love mangoes.
  32. 32.True or false: in <img>, width sets how wide it is. (a) True (b) False
  33. 33.📛 In <a href="x.html">, what is href? (a) an attribute (b) an element name (c) a closing tag (d) a comment
  34. 34.True or false: <ol> lists steps in order. (a) False (b) True
  35. 35.📋 Which list tag shows bullet points? (a) <li> (b) <ul> (c) <ol>
  36. 36.📋 Which list tag lists steps in order? (a) <ol> (b) <ul> (c) <li>
  37. 37.🔍 Which line is missing its closing tag?
    line 1: <h2>Hello, world!
    line 2: <p>I love mangoes.</p>
    line 3: <h1>Fun facts</h1>
    (a) line 2 (b) line 1 (c) line 3
  38. 38.🔗 Where does this link open?
    <a href="art.html">Maths fun</a>
    (a) in a new tab (b) in the same tab
  39. 39.🏷️ Which is the closing tag for <p>? (a) <\p> (b) <p> (c) </p> (d) <p/>
  40. 40.🏷️ Which is the closing tag for <h1>? (a) <\h1> (b) <h1/> (c) </h1> (d) <h1>

Answer key

  1. <h6>
  2. False
  3. <img>
  4. hosts websites online
  5. <table>
  6. an opening tag
  7. 5
  8. answers page requests
  9. An old fort
  10. src
  11. 2
  12. 4
  13. has an address bar
  14. <li>
  15. line 1
  16. has a closing tag
  17. alt
  18. Space Facts
  19. 2
  20. 2
  21. Good morning!
  22. <h5>
  23. <h6>
  24. Take the quiz
  25. Welcome!
  26. alt
  27. a web server
  28. 2
  29. Easy snacks
  30. <ol>
  31. Good morning!
  32. True
  33. an attribute
  34. True
  35. <ul>
  36. <ol>
  37. line 1
  38. in the same tab
  39. </p>
  40. </h1>

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