← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 503 · 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 the text of <title> appear? (a) in a big heading (b) nowhere (c) on the browser tab (d) at the bottom
  2. 2.🔗 What does target="_blank" do to a link? (a) makes it bold (b) hides the link (c) makes it blank (d) opens it in a new tab
  3. 3.🔗 Where does this link open?
    <a href="quiz.html" target="_blank">Maths fun</a>
    (a) in the same tab (b) in a new tab
  4. 4.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="50">
    (a) width (b) A tiger asleep (c) A red kite (d) tiger.jpg
  5. 5.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) body (b) Welcome! (c) Try this poha. (d) Riya’s Recipes
  6. 6.True or false: HTML on its own cannot make links to pages. (a) False (b) True
  7. 7.🔢 In a basic web page file, which comes FIRST? (a) <head> (b) <!DOCTYPE html> (c) </body> (d) <html>
  8. 8.True or false: <ul> goes inside ul or ol. (a) True (b) False
  9. 9.🔗 Which address opens when you click this link?
    <a href="quiz.html">About us</a>
    (a) About us (b) quiz.html (c) games.html (d) about.html
  10. 10.🔗 Which words do you click on?
    <a href="art.html">School news</a>
    (a) Take the quiz (b) School news (c) art.html (d) href
  11. 11.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <!-- <p>Fun facts</p> -->
    <p>My pets</p>
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Hello, world!</p> -->
  12. 12.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <!-- <p>Good morning!</p> -->
    <p>Our school trip</p>
  13. 13.True or false: a code editor shows pages from the web. (a) False (b) True
  14. 14.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="300">
  15. 15.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) body (b) Match report (c) Mars is red. (d) Riya’s Recipes
  16. 16.💬 Does the browser show comments on the page? (a) Yes (b) No
  17. 17.📋 Which tag goes around each item of a list? (a) <ul> (b) <ol> (c) <li> (d) <p>
  18. 18.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Try this poha. (b) Space Facts (c) index.html (d) Welcome!
  19. 19.📋 How many items does this list show?
    <ol>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Orange</li>
      <li>Banana</li>
    </ol>
  20. 20.🔢 In a basic web page file, which comes first: “<html>” or “</body>”? (a) <html> (b) </body>
  21. 21.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
    <h2>My pets</h2>
    <p>I love mangoes.</p>
    <p>Good morning!</p>
  22. 22.💬 Which text will NOT show on the page?
    <!-- <p>Fun facts</p> -->
    <p>My best friend</p>
    <p>The red kite</p>
    (a) The red kite (b) My best friend (c) Fun facts
  23. 23.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  24. 24.🔍 Which is the odd one out? (a) shows pages from the web (b) has an address bar (c) opens web pages for us (d) colours code to help us
  25. 25.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="200">
    (a) Map of India (b) Birthday cake (c) map.png (d) width
  26. 26.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h5> or <h3>? (a) <h3> (b) <h5> (c) <h4> (d) <h2>
  27. 27.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Stars shine</p>
  28. 28.🔗 Which address opens when you click this link?
    <a href="about.html">School news</a>
    (a) https://example.com (b) contact.html (c) School news (d) about.html
  29. 29.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <p>Our school trip</p>
    <!-- <p>Rain today</p> -->
  30. 30.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
  31. 31.🔗 Where does this link open?
    <a href="games.html" target="_blank">Maths fun</a>
    (a) in the same tab (b) in a new tab
  32. 32.🔠 Which tag is used for the main title on a page? (a) <br> (b) <p> (c) <h1> (d) <h6>
  33. 33.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  34. 34.True or false: in <img>, alt sets how tall it is. (a) True (b) False
  35. 35.📛 In <a href="x.html">, what is href? (a) an element name (b) a closing tag (c) an attribute (d) a comment
  36. 36.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <!-- <p>My pets</p> -->
    <p>Rain today</p>
    (a) Rain today (b) My pets (c) My best friend
  37. 37.🏷️ Which is the closing tag for <em>? (a) <em/> (b) </em> (c) <em> (d) <\em>
  38. 38.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="350">
    (a) cake.jpg (b) A happy dog (c) width (d) Birthday cake
  39. 39.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  40. 40.Which of these is true of a web browser? (a) answers page requests (b) has an address bar (c) shows line numbers (d) saves our .html files

Answer key

  1. on the browser tab
  2. opens it in a new tab
  3. in a new tab
  4. A tiger asleep
  5. Welcome!
  6. False
  7. <!DOCTYPE html>
  8. False
  9. quiz.html
  10. School news
  11. 1
  12. 2
  13. False
  14. 300
  15. Match report
  16. No
  17. <li>
  18. Space Facts
  19. 4
  20. <html>
  21. 4
  22. Fun facts
  23. an opening tag
  24. colours code to help us
  25. Map of India
  26. <h2>
  27. 2
  28. about.html
  29. 2
  30. in the body
  31. in a new tab
  32. <h1>
  33. has a closing tag
  34. False
  35. an attribute
  36. My pets
  37. </em>
  38. Birthday cake
  39. has a closing tag
  40. has an address bar

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