← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 281 · 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.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Guava</li>
    </ul>
    (a) numbers (b) bullets
  2. 2.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  3. 3.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
  4. 4.True or false: <img> has a closing tag. (a) True (b) False
  5. 5.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Sky is blue<br>Birds sing<br>Stars shine</p>
  6. 6.🔠 How many heading levels does HTML have? (a) 3 (b) 6 (c) 10 (d) 4
  7. 7.📄 Where does the text of <title> appear? (a) nowhere (b) at the bottom (c) in a big heading (d) on the browser tab
  8. 8.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h4>Cricket is fun.</h4>
    <p>Our school trip</p>
  9. 9.📋 Which list tag lists things in any order? (a) <li> (b) <ul> (c) <ol>
  10. 10.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>My pets</p> -->
    <p>Good morning!</p>
  11. 11.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>Good morning!</p>
    (a) Cricket is fun. (b) I love mangoes. (c) Good morning!
  12. 12.True or false: <ol> is an unordered list. (a) False (b) True
  13. 13.🏷️ Which is the closing tag for <strong>? (a) <strong> (b) <\strong> (c) </strong> (d) <strong/>
  14. 14.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Birds sing<br>Kites fly high</p>
  15. 15.💬 Which text will NOT show on the page?
    <!-- <p>Fun facts</p> -->
    <p>Hello, world!</p>
    <p>Rain today</p>
    <p>Cricket is fun.</p>
    (a) Cricket is fun. (b) Hello, world! (c) Rain today (d) Fun facts
  16. 16.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) makes it blank (d) opens it in a new tab
  17. 17.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Class 7 Blog (b) Easy snacks (c) Thanks for visiting. (d) index.html
  18. 18.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  19. 19.Which of these is a closing tag? (a) <p> (b) <title> (c) </body> (d) <li>
  20. 20.📄 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>Mars is red.</p>
    </body>
    </html>
    (a) My drawings (b) Class 7 Blog (c) Mars is red. (d) body
  21. 21.📋 Which list tag is an ordered list? (a) <ul> (b) <li> (c) <ol>
  22. 22.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="400">
  23. 23.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
  24. 24.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Rivers flow</p>
  25. 25.🔗 Where does this link open?
    <a href="news.html">Play games</a>
    (a) in the same tab (b) in a new tab
  26. 26.🔍 Which line is missing its closing tag?
    line 1: <u>My pets</u>
    line 2: <small>The red kite</small>
    line 3: <strong>Our school trip
    (a) line 3 (b) line 2 (c) line 1
  27. 27.🔗 Which address opens when you click this link?
    <a href="about.html">Visit the site</a>
    (a) https://example.com (b) contact.html (c) about.html (d) Visit the site
  28. 28.🔗 Which words do you click on?
    <a href="about.html">Art corner</a>
    (a) Art corner (b) about.html (c) School news (d) href
  29. 29.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  30. 30.🔠 Which tag is the least important heading? (a) <h3> (b) <h6> (c) <h1> (d) <p>
  31. 31.📛 In <a href="x.html">, what is href? (a) an element name (b) a comment (c) a closing tag (d) an attribute
  32. 32.💬 Why do coders write comments? (a) to add colour (b) to show pictures (c) to make links (d) to leave notes
  33. 33.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h3> or <h2>? (a) <h3> (b) <h5> (c) <h6> (d) <h2>
  34. 34.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <hr> (c) <br> (d) <ul>
  35. 35.📋 Does this list show bullets or numbers?
    <ol>
      <li>Grapes</li>
      <li>Orange</li>
    </ol>
    (a) numbers (b) bullets
  36. 36.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dollar $ (c) a dot . (d) a slash /
  37. 37.🔍 One closing tag is missing. Which one?
    <p>Cricket is fun.</p>
    <h2>I love mangoes.</h2>
    <b>My best friend
    (a) </b> (b) </h2> (c) </p> (d) </h1>
  38. 38.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h2> or <h6>? (a) <h4> (b) <h3> (c) <h2> (d) <h6>
  39. 39.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>Rain today</p>
    <p>The red kite</p>
  40. 40.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h6> (c) <h1> (d) <p>

Answer key

  1. bullets
  2. Yes
  3. in the head
  4. False
  5. 4
  6. 6
  7. on the browser tab
  8. 2
  9. <ul>
  10. 2
  11. Cricket is fun.
  12. False
  13. </strong>
  14. 3
  15. Fun facts
  16. opens it in a new tab
  17. Class 7 Blog
  18. an opening tag
  19. </body>
  20. My drawings
  21. <ol>
  22. 400
  23. in the head
  24. 2
  25. in the same tab
  26. line 3
  27. about.html
  28. Art corner
  29. has a closing tag
  30. <h6>
  31. an attribute
  32. to leave notes
  33. <h2>
  34. <ol>
  35. numbers
  36. a slash /
  37. </b>
  38. <h6>
  39. 2
  40. <h1>

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