← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 434 · 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.🔢 In a basic web page file, which comes first: “</html>” or “<!DOCTYPE html>”? (a) <!DOCTYPE html> (b) </html>
  2. 2.📄 What is the first line of an HTML5 page? (a) <html> (b) <body> (c) <head> (d) <!DOCTYPE html>
  3. 3.🌍 Which program shows a web page to us? (a) a calculator (b) a web browser (c) a music player (d) a paint program
  4. 4.Which of these is an empty tag? (a) <input> (b) <title> (c) <h1> (d) <li>
  5. 5.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  6. 6.True or false: a web browser answers page requests. (a) False (b) True
  7. 7.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Try this poha. (b) Art Gallery (c) Match report (d) body
  8. 8.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  9. 9.True or false: HTML on its own cannot run a game loop. (a) False (b) True
  10. 10.🔗 Where does this link open?
    <a href="games.html">Play games</a>
    (a) in a new tab (b) in the same tab
  11. 11.🔗 Which words do you click on?
    <a href="about.html">School news</a>
    (a) href (b) Take the quiz (c) School news (d) about.html
  12. 12.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <ol> (c) <hr> (d) <br>
  13. 13.🌐 Which one stores a website’s files? (a) a web browser (b) a code editor (c) a web server
  14. 14.True or false: <meta charset="utf-8"> goes in the head. (a) False (b) True
  15. 15.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h2> or <h1>? (a) <h3> (b) <h1> (c) <h5> (d) <h2>
  16. 16.🔗 Which address opens when you click this link?
    <a href="contact.html">Maths fun</a>
    (a) contact.html (b) maths.html (c) https://example.com (d) Maths fun
  17. 17.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>I love mangoes.</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>Our school trip</p>
    (a) Cricket is fun. (b) The red kite (c) I love mangoes. (d) Our school trip
  18. 18.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) Art Gallery (b) We won by 5 runs. (c) Planets (d) body
  19. 19.💬 How does an HTML comment end? (a) --> (b) */ (c) // (d) >>
  20. 20.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h3> or <h5>? (a) <h3> (b) <h2> (c) <h5> (d) <h6>
  21. 21.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Art Gallery (b) All about me (c) Mars is red. (d) body
  22. 22.True or false: a code editor colours code to help us. (a) True (b) False
  23. 23.🔗 Which address opens when you click this link?
    <a href="about.html">Maths fun</a>
    (a) https://example.com (b) contact.html (c) about.html (d) Maths fun
  24. 24.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  25. 25.Which of these is a closing tag? (a) </h1> (b) <h1> (c) <title> (d) <li>
  26. 26.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
  27. 27.Which of these goes in the head? (a) <h1> (b) <title> (c) <table> (d) <a>
  28. 28.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="50">
    (a) A tiger asleep (b) tiger.jpg (c) A red kite (d) width
  29. 29.🔍 One closing tag is missing. Which one?
    <b>I love mangoes.</b>
    <strong>Our school trip
    <em>Fun facts</em>
    (a) </em> (b) </strong> (c) </b> (d) </h1>
  30. 30.📋 How many items does this list show?
    <ul>
      <li>Banana</li>
      <li>Guava</li>
    </ul>
  31. 31.🔗 Which attribute holds the address of a link? (a) id (b) href (c) alt (d) src
  32. 32.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Birds sing<br>Rivers flow<br>Kites fly high<br>Sky is blue</p>
  33. 33.🔗 Which words do you click on?
    <a href="games.html">Art corner</a>
    (a) href (b) School news (c) Art corner (d) games.html
  34. 34.💬 Why do coders write comments? (a) to make links (b) to leave notes (c) to add colour (d) to show pictures
  35. 35.🔠 Are headings shown in bold by default? (a) Yes (b) No
  36. 36.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as a dot (c) as 5 spaces (d) as a new line
  37. 37.🔍 Which is the odd one out? (a) shows pages from the web (b) shows line numbers (c) is where we type code (d) saves our .html files
  38. 38.True or false: <img> goes in the body. (a) True (b) False
  39. 39.True or false: HTML on its own cannot show paragraphs. (a) True (b) False
  40. 40.🔍 Which is the odd one out? (a) colours code to help us (b) is where we type code (c) sends pages over the net (d) shows line numbers

Answer key

  1. <!DOCTYPE html>
  2. <!DOCTYPE html>
  3. a web browser
  4. <input>
  5. a closing tag
  6. False
  7. Match report
  8. a closing tag
  9. True
  10. in the same tab
  11. School news
  12. <ol>
  13. a web server
  14. True
  15. <h1>
  16. contact.html
  17. Cricket is fun.
  18. Planets
  19. -->
  20. <h6>
  21. All about me
  22. True
  23. about.html
  24. an empty tag
  25. </h1>
  26. in the head
  27. <title>
  28. A tiger asleep
  29. </strong>
  30. 2
  31. href
  32. 5
  33. Art corner
  34. to leave notes
  35. Yes
  36. as one space
  37. shows pages from the web
  38. True
  39. False
  40. sends pages over the net

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