← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 167 · 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 goes in the head? (a) <h1> (b) <ul> (c) <link rel="stylesheet"> (d) <img>
  2. 2.Which of these is a closing tag? (a) <body> (b) <b> (c) <p> (d) </li>
  3. 3.Which of these goes in the head? (a) <h1> (b) <style> (c) <p> (d) <ul>
  4. 4.True or false: <p> is an empty tag. (a) True (b) False
  5. 5.🔍 Which line is missing its closing tag?
    line 1: <h1>Good morning!</h1>
    line 2: <b>I love mangoes.</b>
    line 3: <strong>Cricket is fun.
    (a) line 3 (b) line 1 (c) line 2
  6. 6.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h2>Good morning!</h2>
    <h3>Fun facts</h3>
  7. 7.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h5> or <h6>? (a) <h6> (b) <h3> (c) <h1> (d) <h5>
  8. 8.Which of these goes in the head? (a) <h1> (b) <table> (c) <meta charset="utf-8"> (d) <p>
  9. 9.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="250">
    (a) bus.jpg (b) moon.png (c) fort.jpg (d) The full moon
  10. 10.True or false: <ul> shows bullet points. (a) False (b) True
  11. 11.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) My Hobbies (b) Welcome! (c) Mars is red. (d) body
  12. 12.🔍 Which line is missing its closing tag?
    line 1: <h2>The red kite
    line 2: <p>Our school trip</p>
    line 3: <h3>My best friend</h3>
    (a) line 1 (b) line 2 (c) line 3
  13. 13.📋 Which list suits a shopping list in any order? (a) <hr> (b) <br> (c) <ul> (d) <ol>
  14. 14.🔠 Which tag is used for the main title on a page? (a) <br> (b) <p> (c) <h1> (d) <h6>
  15. 15.🔗 Which address opens when you click this link?
    <a href="maths.html">Contact us</a>
    (a) maths.html (b) news.html (c) Contact us (d) art.html
  16. 16.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>Cricket is fun.</p>
    <!-- <p>Fun facts</p> -->
  17. 17.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  18. 18.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h3> or <h4>? (a) <h4> (b) <h3> (c) <h1> (d) <h6>
  19. 19.Which of these is an opening tag? (a) </b> (b) </body> (c) </title> (d) <p>
  20. 20.📋 What number does the browser show next to “Mango”?
    <ol>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Orange</li>
      <li>Papaya</li>
    </ol>
  21. 21.📄 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) Class 7 Blog (b) All about me (c) Thanks for visiting. (d) body
  22. 22.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <h2>Fun facts</h2>
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    <h2>Cricket is fun.</h2>
    <h2>Cricket is fun.</h2>
  23. 23.🖼️ Which attribute of <img> describes the picture? (a) src (b) height (c) alt (d) width
  24. 24.🔗 Which words do you click on?
    <a href="https://example.com">About us</a>
    (a) Contact us (b) https://example.com (c) href (d) About us
  25. 25.🔍 Which is the odd one out? (a) sends pages over the net (b) has an address bar (c) stores a website’s files (d) answers page requests
  26. 26.🔠 Are headings shown in bold by default? (a) No (b) Yes
  27. 27.🔠 Which tag is the least important heading? (a) <p> (b) <h6> (c) <h1> (d) <h3>
  28. 28.🔗 Where does this link open?
    <a href="games.html">Maths fun</a>
    (a) in the same tab (b) in a new tab
  29. 29.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it bold (c) makes it blank (d) hides the link
  30. 30.True or false: HTML on its own can make bullet lists. (a) True (b) False
  31. 31.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h2> or <h5>? (a) <h3> (b) <h5> (c) <h6> (d) <h2>
  32. 32.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <p>Fun facts</p>
    <p>My best friend</p>
    <h2>I love mangoes.</h2>
  33. 33.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a src="about.html"> (c) <link about.html> (d) <a href="about.html">
  34. 34.📋 Does this list show bullets or numbers?
    <ul>
      <li>Litchi</li>
      <li>Papaya</li>
      <li>Orange</li>
    </ul>
    (a) numbers (b) bullets
  35. 35.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h3> or <h6>? (a) <h3> (b) <h1> (c) <h2> (d) <h6>
  36. 36.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Rivers flow</p>
  37. 37.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>Our school trip</p>
    <!-- <p>Rain today</p> -->
    <p>Hello, world!</p>
  38. 38.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h1> or <h2>? (a) <h2> (b) <h1> (c) <h4> (d) <h6>
  39. 39.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  40. 40.🔍 Which is the odd one out? (a) answers page requests (b) sends pages over the net (c) hosts websites online (d) opens web pages for us

Answer key

  1. <link rel="stylesheet">
  2. </li>
  3. <style>
  4. False
  5. line 3
  6. 3
  7. <h6>
  8. <meta charset="utf-8">
  9. moon.png
  10. True
  11. Welcome!
  12. line 1
  13. <ul>
  14. <h1>
  15. maths.html
  16. 1
  17. Yes
  18. <h1>
  19. <p>
  20. 2
  21. All about me
  22. 3
  23. alt
  24. About us
  25. has an address bar
  26. Yes
  27. <h6>
  28. in the same tab
  29. opens it in a new tab
  30. True
  31. <h2>
  32. 3
  33. <a href="about.html">
  34. bullets
  35. <h1>
  36. 2
  37. 2
  38. <h1>
  39. a closing tag
  40. opens web pages for us

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