← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 970 · 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 does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Space Facts (b) Planets (c) index.html (d) Mars is red.
  2. 2.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <h2>My pets</h2>
    <p>Our school trip</p>
    <h2>Rain today</h2>
    <p>Hello, world!</p>
  3. 3.🔗 Where does this link open?
    <a href="maths.html" target="_blank">School news</a>
    (a) in the same tab (b) in a new tab
  4. 4.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h3>I love mangoes.</h3>
    <p>Hello, world!</p>
  5. 5.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Rivers flow</p>
  6. 6.🔗 Which words do you click on?
    <a href="contact.html">School news</a>
    (a) contact.html (b) href (c) School news (d) Take the quiz
  7. 7.Which of these is an empty tag? (a) <h1> (b) <img> (c) <p> (d) <li>
  8. 8.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <table> (c) <meta charset="utf-8"> (d) <title>
  9. 9.🔗 Which address opens when you click this link?
    <a href="games.html">Play games</a>
    (a) about.html (b) contact.html (c) Play games (d) games.html
  10. 10.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h2> or <h3>? (a) <h1> (b) <h5> (c) <h3> (d) <h2>
  11. 11.📝 What does <br> do? (a) adds a picture (b) makes text bold (c) makes a list (d) starts a new line
  12. 12.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) My drawings (b) Space Facts (c) Thanks for visiting. (d) index.html
  13. 13.🔤 In “HTML”, what do the letters HT stand for? (a) High Tech (b) HyperText (c) Home Text (d) Hot Tags
  14. 14.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  15. 15.Which of these is an opening tag? (a) </p> (b) </title> (c) <p> (d) </b>
  16. 16.🔗 Which words do you click on?
    <a href="contact.html">Play games</a>
    (a) About us (b) contact.html (c) href (d) Play games
  17. 17.📋 Which list suits a shopping list in any order? (a) <ol> (b) <ul> (c) <br> (d) <hr>
  18. 18.🔗 Where does this link open?
    <a href="games.html">School news</a>
    (a) in a new tab (b) in the same tab
  19. 19.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="350">
  20. 20.True or false: a web browser answers page requests. (a) True (b) False
  21. 21.🔍 Which line is missing its closing tag?
    line 1: <h2>Hello, world!
    line 2: <u>My pets</u>
    line 3: <h3>I love mangoes.</h3>
    (a) line 2 (b) line 1 (c) line 3
  22. 22.🔢 In a basic web page file, which comes first: “<head>” or “</body>”? (a) </body> (b) <head>
  23. 23.Which of these goes in the body? (a) <title> (b) <meta charset="utf-8"> (c) <style> (d) <p>
  24. 24.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) body (b) All about me (c) Space Facts (d) Mars is red.
  25. 25.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="250">
    (a) dog.jpg (b) cake.jpg (c) moon.png (d) Birthday cake
  26. 26.📋 How many items does this list show?
    <ul>
      <li>Guava</li>
      <li>Orange</li>
      <li>Papaya</li>
      <li>Mango</li>
      <li>Grapes</li>
      <li>Litchi</li>
    </ul>
  27. 27.🏷️ Every HTML tag starts with which sign? (a) < (b) [ (c) ( (d) {
  28. 28.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="350">
  29. 29.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 6 (c) 10 (d) 1
  30. 30.True or false: in <img>, src tells which image to load. (a) False (b) True
  31. 31.🔗 Where does this link open?
    <a href="news.html">Art corner</a>
    (a) in the same tab (b) in a new tab
  32. 32.🔗 Which code links to about.html? (a) <link about.html> (b) <a href="about.html"> (c) <a src="about.html"> (d) <a alt="about.html">
  33. 33.🌐 Which one has an address bar? (a) a web server (b) a code editor (c) a web browser
  34. 34.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h2> or <h3>? (a) <h2> (b) <h1> (c) <h3> (d) <h6>
  35. 35.True or false: <b> has a closing tag. (a) False (b) True
  36. 36.📋 Which list tag shows bullet points? (a) <ul> (b) <ol> (c) <li>
  37. 37.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="150">
    (a) Birthday cake (b) moon.png (c) cake.jpg (d) dog.jpg
  38. 38.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  39. 39.Which of these is an empty tag? (a) <meta> (b) <title> (c) <p> (d) <li>
  40. 40.Which of these has a closing tag? (a) <hr> (b) <input> (c) <img> (d) <p>

Answer key

  1. Space Facts
  2. 3
  3. in a new tab
  4. 2
  5. 2
  6. School news
  7. <img>
  8. <table>
  9. games.html
  10. <h1>
  11. starts a new line
  12. Space Facts
  13. HyperText
  14. a closing tag
  15. <p>
  16. Play games
  17. <ul>
  18. in the same tab
  19. 350
  20. False
  21. line 1
  22. <head>
  23. <p>
  24. All about me
  25. cake.jpg
  26. 6
  27. <
  28. 350
  29. 1
  30. True
  31. in the same tab
  32. <a href="about.html">
  33. a web browser
  34. <h1>
  35. True
  36. <ul>
  37. cake.jpg
  38. an empty tag
  39. <meta>
  40. <p>

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