← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 288 · 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.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>Cricket is fun.</p>
    <h2>Fun facts</h2>
  2. 2.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <a> (d) <link>
  3. 3.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) makes it blank (d) opens it in a new tab
  4. 4.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h1> or <h3>? (a) <h1> (b) <h3> (c) <h4> (d) <h5>
  5. 5.💬 How does an HTML comment end? (a) >> (b) --> (c) */ (d) //
  6. 6.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 1 (c) 6 (d) 3
  7. 7.📋 What number does the browser show next to “Litchi”?
    <ol start="7">
      <li>Guava</li>
      <li>Papaya</li>
      <li>Litchi</li>
    </ol>
  8. 8.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="50">
    (a) Map of India (b) map.png (c) cake.jpg (d) dog.jpg
  9. 9.🔗 Which address opens when you click this link?
    <a href="maths.html">Play games</a>
    (a) news.html (b) art.html (c) Play games (d) maths.html
  10. 10.🔗 Which words do you click on?
    <a href="games.html">Art corner</a>
    (a) School news (b) games.html (c) href (d) Art corner
  11. 11.🔍 Which line is missing its closing tag?
    line 1: <u>My best friend</u>
    line 2: <p>The red kite
    line 3: <h1>Good morning!</h1>
    (a) line 3 (b) line 2 (c) line 1
  12. 12.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Stars shine<br>Rivers flow</p>
  13. 13.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  14. 14.🔍 One closing tag is missing. Which one?
    <p>Our school trip</p>
    <b>Cricket is fun.</b>
    <small>Fun facts
    (a) </p> (b) </h1> (c) </b> (d) </small>
  15. 15.True or false: <li> has a closing tag. (a) False (b) True
  16. 16.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
  17. 17.Which of these is a closing tag? (a) <h1> (b) <p> (c) <title> (d) </li>
  18. 18.True or false: HTML on its own cannot make bullet lists. (a) True (b) False
  19. 19.🏷️ Which is the closing tag for <strong>? (a) <\strong> (b) <strong> (c) </strong> (d) <strong/>
  20. 20.True or false: a code editor opens web pages for us. (a) False (b) True
  21. 21.🔠 How many heading levels does HTML have? (a) 3 (b) 10 (c) 4 (d) 6
  22. 22.📄 What is the first line of an HTML5 page? (a) <html> (b) <head> (c) <body> (d) <!DOCTYPE html>
  23. 23.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Kites fly high<br>Sky is blue<br>Stars shine<br>Roses are red</p>
  24. 24.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  25. 25.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="150">
    (a) Map of India (b) cake.jpg (c) map.png (d) dog.jpg
  26. 26.🔗 Which words do you click on?
    <a href="news.html">Maths fun</a>
    (a) href (b) news.html (c) Art corner (d) Maths fun
  27. 27.True or false: a web server answers page requests. (a) True (b) False
  28. 28.🔍 Which is the odd one out? (a) opens web pages for us (b) has an address bar (c) shows pages from the web (d) sends pages over the net
  29. 29.🖼️ Which attribute of <img> describes the picture? (a) height (b) src (c) alt (d) width
  30. 30.🔤 In “HTML”, what does the M stand for? (a) Machine (b) Mouse (c) Markup (d) Modern
  31. 31.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <p>The red kite</p>
    <!-- <p>Hello, world!</p> -->
  32. 32.🏷️ Is <title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  33. 33.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>I love mangoes.</p>
    <p>Good morning!</p>
    <h4>I love mangoes.</h4>
  34. 34.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <h2>Cricket is fun.</h2>
    <h2>Hello, world!</h2>
    <p>My best friend</p>
  35. 35.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <h2>The red kite</h2>
    <p>Good morning!</p>
  36. 36.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h5> or <h1>? (a) <h5> (b) <h1> (c) <h2> (d) <h3>
  37. 37.📄 Can HTML on its own make headings? (a) Yes (b) No
  38. 38.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="400">
    (a) moon.png (b) cake.jpg (c) dog.jpg (d) Birthday cake
  39. 39.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  40. 40.🏷️ Is </b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag

Answer key

  1. 2
  2. <a>
  3. opens it in a new tab
  4. <h5>
  5. -->
  6. 1
  7. 9
  8. map.png
  9. maths.html
  10. Art corner
  11. line 2
  12. 3
  13. No
  14. </small>
  15. True
  16. in the body
  17. </li>
  18. False
  19. </strong>
  20. False
  21. 6
  22. <!DOCTYPE html>
  23. 5
  24. has a closing tag
  25. map.png
  26. Maths fun
  27. True
  28. sends pages over the net
  29. alt
  30. Markup
  31. 1
  32. an opening tag
  33. 2
  34. 2
  35. 2
  36. <h5>
  37. Yes
  38. cake.jpg
  39. has a closing tag
  40. a closing tag

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