← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 335 · 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.True or false: HTML on its own can keep a high score. (a) False (b) True
  2. 2.True or false: <li> is an empty tag. (a) False (b) True
  3. 3.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h5> or <h4>? (a) <h3> (b) <h5> (c) <h4> (d) <h6>
  4. 4.Which of these is an empty tag? (a) <p> (b) <ul> (c) <meta> (d) <title>
  5. 5.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="100">
  6. 6.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <ol> (c) <hr> (d) <br>
  7. 7.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h2> or <h1>? (a) <h4> (b) <h6> (c) <h2> (d) <h1>
  8. 8.🔠 Are headings shown in bold by default? (a) No (b) Yes
  9. 9.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="50">
    (a) Our school bus (b) fort.jpg (c) tiger.jpg (d) bus.jpg
  10. 10.🔗 Where does this link open?
    <a href="maths.html">School news</a>
    (a) in the same tab (b) in a new tab
  11. 11.Which of these is true of a web server? (a) has an address bar (b) is where we type code (c) shows line numbers (d) hosts websites online
  12. 12.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) All about me (b) body (c) Class 7 Blog (d) Thanks for visiting.
  13. 13.🔗 Which address opens when you click this link?
    <a href="contact.html">Take the quiz</a>
    (a) Take the quiz (b) https://example.com (c) contact.html (d) maths.html
  14. 14.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <p>Hello, world!</p>
    <h2>Good morning!</h2>
  15. 15.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Sky is blue<br>Roses are red</p>
  16. 16.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="350">
    (a) kite.png (b) A red kite (c) cake.jpg (d) map.png
  17. 17.🔍 One closing tag is missing. Which one?
    <h2>The red kite</h2>
    <em>My best friend</em>
    <i>Rain today
    (a) </em> (b) </p> (c) </h2> (d) </i>
  18. 18.📛 In <a href="x.html">, what is href? (a) an element name (b) a comment (c) a closing tag (d) an attribute
  19. 19.🔍 Which line is missing its closing tag?
    line 1: <h2>Good morning!</h2>
    line 2: <strong>The red kite</strong>
    line 3: <p>Rain today
    (a) line 2 (b) line 3 (c) line 1
  20. 20.True or false: <img> is an empty tag. (a) True (b) False
  21. 21.True or false: <input> has a closing tag. (a) False (b) True
  22. 22.📋 Does this list show bullets or numbers?
    <ol>
      <li>Mango</li>
      <li>Banana</li>
      <li>Litchi</li>
    </ol>
    (a) bullets (b) numbers
  23. 23.True or false: <style> goes in the body. (a) False (b) True
  24. 24.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h2> or <h6>? (a) <h2> (b) <h1> (c) <h4> (d) <h6>
  25. 25.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>Rain today</p> -->
    <p>Hello, world!</p>
    <p>Good morning!</p>
    (a) Cricket is fun. (b) Hello, world! (c) Good morning! (d) Rain today
  26. 26.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h3> or <h2>? (a) <h2> (b) <h1> (c) <h5> (d) <h3>
  27. 27.True or false: in <img>, src shows if the image fails. (a) True (b) False
  28. 28.🔍 One closing tag is missing. Which one?
    <i>Rain today
    <small>Fun facts</small>
    <em>The red kite</em>
    (a) </h1> (b) </em> (c) </i> (d) </small>
  29. 29.🔗 Which words do you click on?
    <a href="maths.html">Maths fun</a>
    (a) Art corner (b) href (c) maths.html (d) Maths fun
  30. 30.🔠 How many heading levels does HTML have? (a) 10 (b) 3 (c) 6 (d) 4
  31. 31.📋 How many items does this list show?
    <ol>
      <li>Guava</li>
      <li>Orange</li>
      <li>Mango</li>
      <li>Banana</li>
      <li>Litchi</li>
    </ol>
  32. 32.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <!-- <p>My best friend</p> -->
    <p>Our school trip</p>
    (a) Our school trip (b) My best friend (c) I love mangoes.
  33. 33.Which of these is true of a web browser? (a) saves our .html files (b) hosts websites online (c) stores a website’s files (d) turns HTML into a page
  34. 34.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <h2>Good morning!</h2>
    <p>Cricket is fun.</p>
    <h2>Hello, world!</h2>
    <p>The red kite</p>
    <p>Hello, world!</p>
  35. 35.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>My pets</p>
    <h4>Hello, world!</h4>
  36. 36.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="400">
  37. 37.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  38. 38.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  39. 39.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
  40. 40.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head

Answer key

  1. False
  2. False
  3. <h6>
  4. <meta>
  5. 100
  6. <ol>
  7. <h1>
  8. Yes
  9. bus.jpg
  10. in the same tab
  11. hosts websites online
  12. All about me
  13. contact.html
  14. 2
  15. 3
  16. kite.png
  17. </i>
  18. an attribute
  19. line 3
  20. True
  21. False
  22. numbers
  23. False
  24. <h6>
  25. Rain today
  26. <h1>
  27. False
  28. </i>
  29. Maths fun
  30. 6
  31. 5
  32. My best friend
  33. turns HTML into a page
  34. 4
  35. 2
  36. 400
  37. an opening tag
  38. No
  39. in the head
  40. in the body

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