← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 620 · 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.🔗 Where does this link open?
    <a href="quiz.html" target="_blank">About us</a>
    (a) in a new tab (b) in the same tab
  2. 2.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h4>Our school trip</h4>
    <h2>I love mangoes.</h2>
  3. 3.📝 What does <p> make? (a) a picture (b) a link (c) a table (d) a paragraph
  4. 4.🔠 Which tag is the least important heading? (a) <h1> (b) <h6> (c) <h3> (d) <p>
  5. 5.💬 Why do coders write comments? (a) to leave notes (b) to show pictures (c) to make links (d) to add colour
  6. 6.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>My best friend</p>
    <p>My pets</p>
    <p>I love mangoes.</p>
    <h3>Our school trip</h3>
  7. 7.📋 How many items does this list show?
    <ol>
      <li>Grapes</li>
      <li>Orange</li>
      <li>Litchi</li>
      <li>Jamun</li>
    </ol>
  8. 8.📋 Does this list show bullets or numbers?
    <ul>
      <li>Orange</li>
      <li>Grapes</li>
    </ul>
    (a) numbers (b) bullets
  9. 9.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 1 (c) 10 (d) 3
  10. 10.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  11. 11.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <p>Rain today</p>
    <!-- <p>My pets</p> -->
    <p>Fun facts</p>
  12. 12.📝 What does <hr> draw? (a) a link (b) a picture (c) a line across the page (d) a table
  13. 13.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Roses are red<br>Stars shine</p>
  14. 14.📋 Which list suits a shopping list in any order? (a) <ol> (b) <ul> (c) <hr> (d) <br>
  15. 15.True or false: in <img>, src sets how tall it is. (a) False (b) True
  16. 16.🔗 Which address opens when you click this link?
    <a href="art.html">Visit the site</a>
    (a) quiz.html (b) Visit the site (c) art.html (d) news.html
  17. 17.🖼️ Which tag puts a picture on a page? (a) <p> (b) <a> (c) <img> (d) <pic>
  18. 18.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  19. 19.💬 Does the browser show comments on the page? (a) Yes (b) No
  20. 20.🌍 Which program shows a web page to us? (a) a web browser (b) a calculator (c) a music player (d) a paint program
  21. 21.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h1> or <h3>? (a) <h6> (b) <h2> (c) <h3> (d) <h1>
  22. 22.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>I love mangoes.</p>
    <p>My best friend</p>
  23. 23.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h5> or <h1>? (a) <h4> (b) <h5> (c) <h2> (d) <h1>
  24. 24.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as one space (c) as 5 spaces (d) as a dot
  25. 25.🔤 In “HTML”, what do the letters HT stand for? (a) Home Text (b) High Tech (c) HyperText (d) Hot Tags
  26. 26.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="250">
    (a) Our school bus (b) An old fort (c) bus.jpg (d) width
  27. 27.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <p>My pets</p>
    <p>Hello, world!</p>
    <!-- <p>Good morning!</p> -->
  28. 28.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to colour it (c) to load it faster (d) to make it bigger
  29. 29.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
  30. 30.🔠 How many heading levels does HTML have? (a) 4 (b) 3 (c) 6 (d) 10
  31. 31.📋 What number does the browser show next to “Banana”?
    <ol start="9">
      <li>Litchi</li>
      <li>Banana</li>
      <li>Mango</li>
      <li>Grapes</li>
      <li>Guava</li>
    </ol>
  32. 32.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h5> or <h1>? (a) <h2> (b) <h1> (c) <h5> (d) <h3>
  33. 33.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ul> (c) <ol>
  34. 34.📝 Does <input> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  35. 35.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Class 7 Blog (b) Here is my best one. (c) body (d) Match report
  36. 36.🖼️ Which attribute of <img> names the picture file? (a) alt (b) height (c) width (d) src
  37. 37.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h2> or <h5>? (a) <h3> (b) <h1> (c) <h5> (d) <h2>
  38. 38.🔗 Which address opens when you click this link?
    <a href="art.html">Take the quiz</a>
    (a) Take the quiz (b) news.html (c) quiz.html (d) art.html
  39. 39.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <!-- <p>Hello, world!</p> -->
    <p>Rain today</p>
    (a) My best friend (b) Hello, world! (c) Rain today
  40. 40.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body

Answer key

  1. in a new tab
  2. 3
  3. a paragraph
  4. <h6>
  5. to leave notes
  6. 2
  7. 4
  8. bullets
  9. 1
  10. has a closing tag
  11. 3
  12. a line across the page
  13. 3
  14. <ul>
  15. False
  16. art.html
  17. <img>
  18. an opening tag
  19. No
  20. a web browser
  21. <h1>
  22. 2
  23. <h1>
  24. as one space
  25. HyperText
  26. Our school bus
  27. 2
  28. to describe the image
  29. in the body
  30. 6
  31. 10
  32. <h5>
  33. <ol>
  34. an empty tag
  35. Match report
  36. src
  37. <h5>
  38. art.html
  39. Hello, world!
  40. in the body

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