← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 531 · 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.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Easy snacks (b) Here is my best one. (c) Art Gallery (d) body
  2. 2.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 3 (d) 4
  3. 3.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <p>Hello, world!</p>
    <p>My best friend</p>
  4. 4.📄 Where does the text of <title> appear? (a) on the browser tab (b) nowhere (c) in a big heading (d) at the bottom
  5. 5.📋 How many items does this list show?
    <ol>
      <li>Papaya</li>
      <li>Banana</li>
    </ol>
  6. 6.💬 How does an HTML comment start? (a) /* (b) <!-- (c) # (d) //
  7. 7.🏷️ HTML marks up text using ___. (a) pixels (b) wires (c) keys (d) tags
  8. 8.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <p>The red kite</p>
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
  9. 9.📋 Which list tag is an unordered list? (a) <li> (b) <ol> (c) <ul>
  10. 10.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>My pets</p>
    <p>Cricket is fun.</p>
    <!-- <p>Fun facts</p> -->
    (a) Cricket is fun. (b) My pets (c) I love mangoes. (d) Fun facts
  11. 11.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h4> or <h6>? (a) <h5> (b) <h2> (c) <h4> (d) <h6>
  12. 12.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="350">
  13. 13.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  14. 14.📄 What is the first line of an HTML5 page? (a) <body> (b) <html> (c) <!DOCTYPE html> (d) <head>
  15. 15.📄 Which part holds everything you see on the page? (a) the doctype (b) the title (c) the body (d) the head
  16. 16.📋 How many items does this list show?
    <ol>
      <li>Mango</li>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Orange</li>
      <li>Papaya</li>
      <li>Litchi</li>
    </ol>
  17. 17.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="100">
  18. 18.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Rivers flow<br>Sky is blue</p>
  19. 19.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
    <!-- <p>The red kite</p> -->
    (a) Our school trip (b) The red kite (c) Cricket is fun.
  20. 20.💬 Why do coders write comments? (a) to leave notes (b) to show pictures (c) to make links (d) to add colour
  21. 21.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h4> or <h6>? (a) <h5> (b) <h1> (c) <h4> (d) <h6>
  22. 22.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  23. 23.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h5> or <h4>? (a) <h6> (b) <h2> (c) <h4> (d) <h5>
  24. 24.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>My best friend</p> -->
    <p>My pets</p>
    <p>I love mangoes.</p>
    (a) My pets (b) I love mangoes. (c) Cricket is fun. (d) My best friend
  25. 25.True or false: a web server turns HTML into a page. (a) False (b) True
  26. 26.🔗 Which address opens when you click this link?
    <a href="contact.html">Maths fun</a>
    (a) contact.html (b) maths.html (c) https://example.com (d) Maths fun
  27. 27.🔠 Are headings shown in bold by default? (a) Yes (b) No
  28. 28.🔗 Where does this link open?
    <a href="maths.html">School news</a>
    (a) in a new tab (b) in the same tab
  29. 29.📋 How many items does this list show?
    <ul>
      <li>Guava</li>
      <li>Litchi</li>
      <li>Grapes</li>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Banana</li>
    </ul>
  30. 30.Which of these is true of a code editor? (a) stores a website’s files (b) opens web pages for us (c) shows pages from the web (d) colours code to help us
  31. 31.🌐 Which one shows line numbers? (a) a code editor (b) a web server (c) a web browser
  32. 32.📋 How many items does this list show?
    <ul>
      <li>Banana</li>
      <li>Guava</li>
      <li>Orange</li>
      <li>Papaya</li>
      <li>Grapes</li>
      <li>Jamun</li>
    </ul>
  33. 33.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) body (b) My drawings (c) We won by 5 runs. (d) Class 7 Blog
  34. 34.True or false: <ul> is an empty tag. (a) True (b) False
  35. 35.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <p> (d) <a>
  36. 36.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
  37. 37.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="350">
    (a) width (b) dog.jpg (c) The full moon (d) A happy dog
  38. 38.🔗 Where does this link open?
    <a href="https://example.com">Art corner</a>
    (a) in a new tab (b) in the same tab
  39. 39.💬 How does an HTML comment end? (a) */ (b) >> (c) --> (d) //
  40. 40.🔗 Where does this link open?
    <a href="maths.html" target="_blank">Visit the site</a>
    (a) in a new tab (b) in the same tab

Answer key

  1. Easy snacks
  2. 6
  3. 3
  4. on the browser tab
  5. 2
  6. <!--
  7. tags
  8. 3
  9. <ul>
  10. Fun facts
  11. <h2>
  12. 350
  13. has a closing tag
  14. <!DOCTYPE html>
  15. the body
  16. 6
  17. 100
  18. 3
  19. The red kite
  20. to leave notes
  21. <h6>
  22. a closing tag
  23. <h2>
  24. My best friend
  25. False
  26. contact.html
  27. Yes
  28. in the same tab
  29. 6
  30. colours code to help us
  31. a code editor
  32. 6
  33. My drawings
  34. False
  35. <a>
  36. No
  37. A happy dog
  38. in the same tab
  39. -->
  40. in a new tab

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