← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 523 · 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.🏷️ HTML marks up text using ___. (a) wires (b) tags (c) pixels (d) keys
  2. 2.🖼️ Which attribute of <img> describes the picture? (a) width (b) src (c) alt (d) height
  3. 3.🔗 Where does this link open?
    <a href="games.html">About us</a>
    (a) in the same tab (b) in a new tab
  4. 4.🔗 Where does this link open?
    <a href="https://example.com">Contact us</a>
    (a) in the same tab (b) in a new tab
  5. 5.🔢 In a basic web page file, which comes FIRST? (a) </html> (b) <html> (c) <body> (d) <!DOCTYPE html>
  6. 6.🔗 Which address opens when you click this link?
    <a href="quiz.html">Maths fun</a>
    (a) about.html (b) quiz.html (c) games.html (d) Maths fun
  7. 7.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h5> or <h2>? (a) <h6> (b) <h2> (c) <h4> (d) <h5>
  8. 8.🖼️ Which tag puts a picture on a page? (a) <img> (b) <p> (c) <pic> (d) <a>
  9. 9.True or false: <meta charset="utf-8"> goes in the head. (a) False (b) True
  10. 10.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Stars shine<br>Birds sing<br>Sky is blue</p>
  11. 11.🔗 Which words do you click on?
    <a href="contact.html">Contact us</a>
    (a) Visit the site (b) href (c) Contact us (d) contact.html
  12. 12.📋 What number does the browser show next to “Jamun”?
    <ol start="6">
      <li>Orange</li>
      <li>Litchi</li>
      <li>Mango</li>
      <li>Jamun</li>
      <li>Papaya</li>
    </ol>
  13. 13.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h6> or <h5>? (a) <h2> (b) <h5> (c) <h1> (d) <h6>
  14. 14.True or false: <ul> lists things in any order. (a) True (b) False
  15. 15.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <h2>Fun facts</h2>
    <p>Hello, world!</p>
    <h2>Cricket is fun.</h2>
    <h2>Fun facts</h2>
    <p>Cricket is fun.</p>
  16. 16.🔗 Which address opens when you click this link?
    <a href="maths.html">Maths fun</a>
    (a) news.html (b) maths.html (c) art.html (d) Maths fun
  17. 17.True or false: in <img>, height sets how tall it is. (a) False (b) True
  18. 18.📋 Which tag goes around each item of a list? (a) <ol> (b) <ul> (c) <li> (d) <p>
  19. 19.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  20. 20.🔢 In a basic web page file, which comes first: “<body>” or “</head>”? (a) </head> (b) <body>
  21. 21.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a src="about.html"> (c) <link about.html> (d) <a alt="about.html">
  22. 22.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Kites fly high<br>Stars shine<br>Birds sing<br>Rivers flow</p>
  23. 23.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) I like to read. (b) Class 7 Blog (c) index.html (d) Welcome!
  24. 24.True or false: <p> goes in the head. (a) True (b) False
  25. 25.📄 What is the first line of an HTML5 page? (a) <body> (b) <html> (c) <head> (d) <!DOCTYPE html>
  26. 26.🧱 HTML gives a web page its ___. (a) speed (b) sound (c) structure (d) colours
  27. 27.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  28. 28.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="100">
    (a) Birthday cake (b) width (c) Map of India (d) map.png
  29. 29.📋 Does this list show bullets or numbers?
    <ol>
      <li>Guava</li>
      <li>Grapes</li>
    </ol>
    (a) numbers (b) bullets
  30. 30.True or false: in <img>, height tells which image to load. (a) False (b) True
  31. 31.Which of these is true of a code editor? (a) opens web pages for us (b) is where we type code (c) has an address bar (d) turns HTML into a page
  32. 32.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="50">
    (a) width (b) kite.png (c) A red kite (d) Map of India
  33. 33.📄 Can HTML on its own count button clicks? (a) No (b) Yes
  34. 34.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>My pets</p>
    <p>Our school trip</p>
    <!-- <p>My best friend</p> -->
    (a) Our school trip (b) Fun facts (c) My pets (d) My best friend
  35. 35.🔍 Which line is missing its closing tag?
    line 1: <h3>Rain today</h3>
    line 2: <u>Cricket is fun.</u>
    line 3: <h2>I love mangoes.
    (a) line 3 (b) line 2 (c) line 1
  36. 36.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <p>Our school trip</p>
    <!-- <p>Rain today</p> -->
    (a) Rain today (b) Our school trip (c) Hello, world!
  37. 37.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="250">
    (a) bus.jpg (b) fort.jpg (c) The full moon (d) moon.png
  38. 38.True or false: in <img>, width names the picture file. (a) False (b) True
  39. 39.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
    <!-- <p>Rain today</p> -->
  40. 40.True or false: HTML on its own can add pictures to a page. (a) True (b) False

Answer key

  1. tags
  2. alt
  3. in the same tab
  4. in the same tab
  5. <!DOCTYPE html>
  6. quiz.html
  7. <h2>
  8. <img>
  9. True
  10. 4
  11. Contact us
  12. 9
  13. <h1>
  14. True
  15. 3
  16. maths.html
  17. True
  18. <li>
  19. an empty tag
  20. </head>
  21. <a href="about.html">
  22. 5
  23. Class 7 Blog
  24. False
  25. <!DOCTYPE html>
  26. structure
  27. a closing tag
  28. Map of India
  29. numbers
  30. False
  31. is where we type code
  32. A red kite
  33. No
  34. My best friend
  35. line 3
  36. Rain today
  37. moon.png
  38. False
  39. 2
  40. True

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