← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 866 · 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 attribute of <img> shows if the image fails? (a) height (b) alt (c) src (d) width
  2. 2.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>Fun facts</p>
    <p>Our school trip</p>
    <p>Hello, world!</p>
    <!-- <p>Cricket is fun.</p> -->
  3. 3.🔍 Which is the odd one out? (a) sends pages over the net (b) hosts websites online (c) is where we type code (d) stores a website’s files
  4. 4.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h1> or <h5>? (a) <h4> (b) <h5> (c) <h1> (d) <h3>
  5. 5.🏷️ HTML marks up text using ___. (a) pixels (b) wires (c) tags (d) keys
  6. 6.📋 Does this list show bullets or numbers?
    <ul>
      <li>Orange</li>
      <li>Papaya</li>
      <li>Jamun</li>
    </ul>
    (a) numbers (b) bullets
  7. 7.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
  8. 8.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h2> or <h6>? (a) <h6> (b) <h2> (c) <h3> (d) <h1>
  9. 9.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="50">
    (a) A red kite (b) tiger.jpg (c) width (d) A tiger asleep
  10. 10.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  11. 11.📋 How many items does this list show?
    <ul>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Orange</li>
      <li>Papaya</li>
      <li>Guava</li>
    </ul>
  12. 12.🔗 Which address opens when you click this link?
    <a href="quiz.html">Play games</a>
    (a) about.html (b) Play games (c) games.html (d) quiz.html
  13. 13.Which of these is true of a web browser? (a) opens web pages for us (b) stores a website’s files (c) colours code to help us (d) shows line numbers
  14. 14.🏷️ Which is the closing tag for <i>? (a) <i> (b) <i/> (c) <\i> (d) </i>
  15. 15.Which of these has a closing tag? (a) <hr> (b) <br> (c) <title> (d) <img>
  16. 16.📋 Does this list show bullets or numbers?
    <ol>
      <li>Jamun</li>
      <li>Papaya</li>
    </ol>
    (a) numbers (b) bullets
  17. 17.📋 How many items does this list show?
    <ul>
      <li>Litchi</li>
      <li>Orange</li>
      <li>Grapes</li>
      <li>Mango</li>
    </ul>
  18. 18.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>I love mangoes.</p>
    <p>My pets</p>
    <p>My pets</p>
  19. 19.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h6> (c) <br> (d) <h1>
  20. 20.📋 Does this list show bullets or numbers?
    <ul>
      <li>Papaya</li>
      <li>Jamun</li>
    </ul>
    (a) numbers (b) bullets
  21. 21.Which of these is true of a web browser? (a) colours code to help us (b) sends pages over the net (c) saves our .html files (d) turns HTML into a page
  22. 22.Which of these is a closing tag? (a) <b> (b) <title> (c) <h1> (d) </p>
  23. 23.🔠 Which tag is the least important heading? (a) <p> (b) <h3> (c) <h1> (d) <h6>
  24. 24.🔍 Which line is missing its closing tag?
    line 1: <p>My pets</p>
    line 2: <b>I love mangoes.</b>
    line 3: <i>Rain today
    (a) line 2 (b) line 1 (c) line 3
  25. 25.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h6> or <h5>? (a) <h5> (b) <h1> (c) <h6> (d) <h3>
  26. 26.🔠 How many heading levels does HTML have? (a) 3 (b) 6 (c) 4 (d) 10
  27. 27.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Here is my best one. (b) body (c) Planets (d) My Hobbies
  28. 28.📝 Does <li> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  29. 29.🖼️ Which tag puts a picture on a page? (a) <a> (b) <pic> (c) <p> (d) <img>
  30. 30.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ul> (c) <ol> (d) <br>
  31. 31.🌐 Which one opens web pages for us? (a) a web browser (b) a code editor (c) a web server
  32. 32.🏷️ Is </b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  33. 33.🔍 One closing tag is missing. Which one?
    <h1>I love mangoes.</h1>
    <em>Cricket is fun.
    <u>Rain today</u>
    (a) </u> (b) </em> (c) </h1> (d) </h2>
  34. 34.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="250">
  35. 35.🏷️ Which is the closing tag for <p>? (a) <p/> (b) </p> (c) <p> (d) <\p>
  36. 36.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) alt (c) width (d) height
  37. 37.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="100">
  38. 38.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h5> or <h4>? (a) <h2> (b) <h3> (c) <h5> (d) <h4>
  39. 39.🔗 Which address opens when you click this link?
    <a href="maths.html">Contact us</a>
    (a) art.html (b) Contact us (c) maths.html (d) news.html
  40. 40.💬 Why do coders write comments? (a) to make links (b) to add colour (c) to leave notes (d) to show pictures

Answer key

  1. alt
  2. 3
  3. is where we type code
  4. <h5>
  5. tags
  6. bullets
  7. in the body
  8. <h1>
  9. A tiger asleep
  10. an opening tag
  11. 5
  12. quiz.html
  13. opens web pages for us
  14. </i>
  15. <title>
  16. numbers
  17. 4
  18. 4
  19. <h1>
  20. bullets
  21. turns HTML into a page
  22. </p>
  23. <h6>
  24. line 3
  25. <h1>
  26. 6
  27. Planets
  28. has a closing tag
  29. <img>
  30. <ul>
  31. a web browser
  32. a closing tag
  33. </em>
  34. 250
  35. </p>
  36. height
  37. 100
  38. <h2>
  39. maths.html
  40. to leave notes

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