← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 189 · 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.💬 Why do coders write comments? (a) to show pictures (b) to add colour (c) to make links (d) to leave notes
  2. 2.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  3. 3.🔍 Which line is missing its closing tag?
    line 1: <em>Our school trip</em>
    line 2: <strong>Hello, world!</strong>
    line 3: <h1>I love mangoes.
    (a) line 1 (b) line 3 (c) line 2
  4. 4.🔗 Which tag makes a clickable link? (a) <a> (b) <img> (c) <link> (d) <p>
  5. 5.Which of these is true of a code editor? (a) shows pages from the web (b) sends pages over the net (c) answers page requests (d) saves our .html files
  6. 6.🔍 One closing tag is missing. Which one?
    <h3>Fun facts</h3>
    <b>Good morning!
    <p>Our school trip</p>
    (a) </i> (b) </b> (c) </p> (d) </h3>
  7. 7.Which of these goes in the head? (a) <title> (b) <a> (c) <table> (d) <p>
  8. 8.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
    <!-- <p>My best friend</p> -->
    (a) Fun facts (b) I love mangoes. (c) Cricket is fun. (d) My best friend
  9. 9.💬 How does an HTML comment start? (a) // (b) # (c) <!-- (d) /*
  10. 10.📋 Does this list show bullets or numbers?
    <ol>
      <li>Grapes</li>
      <li>Papaya</li>
    </ol>
    (a) numbers (b) bullets
  11. 11.📛 In <a href="x.html">, what is href? (a) an attribute (b) an element name (c) a comment (d) a closing tag
  12. 12.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <p>Fun facts</p>
    <p>My best friend</p>
  13. 13.🌐 Which one answers page requests? (a) a web browser (b) a code editor (c) a web server
  14. 14.🔗 Where does this link open?
    <a href="contact.html" target="_blank">About us</a>
    (a) in a new tab (b) in the same tab
  15. 15.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) index.html (b) Space Facts (c) Planets (d) We won by 5 runs.
  16. 16.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h1> or <h6>? (a) <h6> (b) <h5> (c) <h3> (d) <h1>
  17. 17.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
  18. 18.🔗 Which words do you click on?
    <a href="games.html">Play games</a>
    (a) Play games (b) games.html (c) href (d) About us
  19. 19.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <!-- <p>Good morning!</p> -->
    <!-- <p>My pets</p> -->
  20. 20.🔗 Which words do you click on?
    <a href="https://example.com">Contact us</a>
    (a) https://example.com (b) href (c) Visit the site (d) Contact us
  21. 21.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <!-- <p>Rain today</p> -->
    <p>Good morning!</p>
    <p>My pets</p>
  22. 22.True or false: in <img>, alt names the picture file. (a) True (b) False
  23. 23.📄 Can HTML on its own keep a high score? (a) No (b) Yes
  24. 24.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Birds sing<br>Sky is blue<br>Roses are red<br>Rivers flow</p>
  25. 25.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h1> or <h2>? (a) <h4> (b) <h2> (c) <h5> (d) <h1>
  26. 26.True or false: a web server answers page requests. (a) True (b) False
  27. 27.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h1> or <h3>? (a) <h4> (b) <h5> (c) <h3> (d) <h1>
  28. 28.🔗 Which words do you click on?
    <a href="news.html">Art corner</a>
    (a) School news (b) Art corner (c) news.html (d) href
  29. 29.🔗 Which address opens when you click this link?
    <a href="art.html">Art corner</a>
    (a) news.html (b) art.html (c) quiz.html (d) Art corner
  30. 30.📄 What does the browser tab show for 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) index.html (b) We won by 5 runs. (c) Welcome! (d) Art Gallery
  31. 31.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="150">
    (a) Birthday cake (b) Map of India (c) width (d) map.png
  32. 32.True or false: a web browser answers page requests. (a) False (b) True
  33. 33.📋 Which list tag goes inside ul or ol? (a) <ul> (b) <li> (c) <ol>
  34. 34.🔗 Which words do you click on?
    <a href="https://example.com">Play games</a>
    (a) About us (b) https://example.com (c) Play games (d) href
  35. 35.📋 What number does the browser show next to “Litchi”?
    <ol start="3">
      <li>Papaya</li>
      <li>Guava</li>
      <li>Banana</li>
      <li>Litchi</li>
      <li>Grapes</li>
    </ol>
  36. 36.🌐 Which one shows pages from the web? (a) a code editor (b) a web server (c) a web browser
  37. 37.🔗 Where does this link open?
    <a href="news.html">Art corner</a>
    (a) in the same tab (b) in a new tab
  38. 38.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h5> or <h4>? (a) <h6> (b) <h5> (c) <h4> (d) <h3>
  39. 39.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
  40. 40.💬 How does an HTML comment end? (a) */ (b) // (c) --> (d) >>

Answer key

  1. to leave notes
  2. No
  3. line 3
  4. <a>
  5. saves our .html files
  6. </b>
  7. <title>
  8. My best friend
  9. <!--
  10. numbers
  11. an attribute
  12. 3
  13. a web server
  14. in a new tab
  15. Space Facts
  16. <h1>
  17. 3
  18. Play games
  19. 1
  20. Contact us
  21. 3
  22. False
  23. No
  24. 5
  25. <h5>
  26. True
  27. <h5>
  28. Art corner
  29. art.html
  30. Art Gallery
  31. Map of India
  32. False
  33. <li>
  34. Play games
  35. 6
  36. a web browser
  37. in the same tab
  38. <h3>
  39. in the body
  40. -->

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