← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 896 · 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 number does the browser show next to “Litchi”?
    <ol start="6">
      <li>Orange</li>
      <li>Grapes</li>
      <li>Banana</li>
      <li>Litchi</li>
    </ol>
  2. 2.🌐 Which one saves our .html files? (a) a code editor (b) a web browser (c) a web server
  3. 3.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h2> or <h6>? (a) <h4> (b) <h6> (c) <h2> (d) <h1>
  4. 4.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  5. 5.🔠 Which tag is used for the main title on a page? (a) <br> (b) <p> (c) <h6> (d) <h1>
  6. 6.🔗 Which address opens when you click this link?
    <a href="quiz.html">Art corner</a>
    (a) games.html (b) Art corner (c) about.html (d) quiz.html
  7. 7.🔗 Which address opens when you click this link?
    <a href="contact.html">School news</a>
    (a) https://example.com (b) maths.html (c) School news (d) contact.html
  8. 8.True or false: <title> is an empty tag. (a) True (b) False
  9. 9.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Kites fly high<br>Stars shine<br>Birds sing</p>
  10. 10.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>The red kite</p> -->
    <p>My pets</p>
    <!-- <p>Hello, world!</p> -->
  11. 11.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="400">
    (a) fort.jpg (b) Our school bus (c) tiger.jpg (d) bus.jpg
  12. 12.📄 What is the first line of an HTML5 page? (a) <body> (b) <!DOCTYPE html> (c) <head> (d) <html>
  13. 13.True or false: in <img>, src names the picture file. (a) True (b) False
  14. 14.📋 Which tag goes around each item of a list? (a) <li> (b) <ul> (c) <p> (d) <ol>
  15. 15.📋 How many items does this list show?
    <ol>
      <li>Mango</li>
      <li>Orange</li>
    </ol>
  16. 16.🌐 Which one has an address bar? (a) a web server (b) a web browser (c) a code editor
  17. 17.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <!-- <p>My pets</p> -->
    <p>Rain today</p>
    (a) Rain today (b) Fun facts (c) My pets
  18. 18.Which of these is true of a web server? (a) opens web pages for us (b) stores a website’s files (c) colours code to help us (d) is where we type code
  19. 19.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <p> (c) <meta charset="utf-8"> (d) <title>
  20. 20.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <!-- <p>The red kite</p> -->
    <!-- <p>Our school trip</p> -->
    <p>Rain today</p>
    <!-- <p>Hello, world!</p> -->
  21. 21.True or false: <ol> goes inside ul or ol. (a) False (b) True
  22. 22.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h2>Cricket is fun.</h2>
    <h4>I love mangoes.</h4>
    <h2>I love mangoes.</h2>
  23. 23.Which of these goes in the head? (a) <img> (b) <h1> (c) <meta charset="utf-8"> (d) <p>
  24. 24.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Rivers flow</p>
  25. 25.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="150">
    (a) A tiger asleep (b) fort.jpg (c) width (d) An old fort
  26. 26.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Class 7 Blog (b) index.html (c) Match report (d) Thanks for visiting.
  27. 27.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) index.html (b) Thanks for visiting. (c) My Hobbies (d) Easy snacks
  28. 28.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <h2>Good morning!</h2>
    <h4>Hello, world!</h4>
  29. 29.True or false: a web browser has an address bar. (a) True (b) False
  30. 30.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="200">
  31. 31.True or false: <table> goes in the head. (a) False (b) True
  32. 32.Which of these goes in the head? (a) <img> (b) <h1> (c) <table> (d) <title>
  33. 33.Which of these is an opening tag? (a) <title> (b) </p> (c) </h1> (d) </body>
  34. 34.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Sky is blue<br>Kites fly high<br>Rivers flow<br>Roses are red</p>
  35. 35.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="400">
  36. 36.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <!-- <p>The red kite</p> -->
    <p>Hello, world!</p>
    (a) My best friend (b) Hello, world! (c) The red kite
  37. 37.True or false: in <img>, alt names the picture file. (a) True (b) False
  38. 38.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) Welcome! (b) body (c) Art Gallery (d) We won by 5 runs.
  39. 39.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <!-- <p>Fun facts</p> -->
    <!-- <p>Cricket is fun.</p> -->
  40. 40.True or false: <ol> lists things in any order. (a) False (b) True

Answer key

  1. 9
  2. a code editor
  3. <h6>
  4. Yes
  5. <h1>
  6. quiz.html
  7. contact.html
  8. False
  9. 4
  10. 1
  11. bus.jpg
  12. <!DOCTYPE html>
  13. True
  14. <li>
  15. 2
  16. a web browser
  17. My pets
  18. stores a website’s files
  19. <p>
  20. 1
  21. False
  22. 4
  23. <meta charset="utf-8">
  24. 2
  25. An old fort
  26. Class 7 Blog
  27. My Hobbies
  28. 3
  29. True
  30. 200
  31. False
  32. <title>
  33. <title>
  34. 5
  35. 400
  36. The red kite
  37. False
  38. Welcome!
  39. 1
  40. False

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