← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 915 · 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.True or false: <img> has a closing tag. (a) False (b) True
  2. 2.🔍 One closing tag is missing. Which one?
    <h3>Fun facts</h3>
    <h2>The red kite
    <em>Good morning!</em>
    (a) </h2> (b) </b> (c) </h3> (d) </em>
  3. 3.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <p>Hello, world!</p>
    <p>The red kite</p>
    <!-- <p>My best friend</p> -->
  4. 4.🔢 In a basic web page file, which comes FIRST? (a) <html> (b) <!DOCTYPE html> (c) </head> (d) </body>
  5. 5.🔗 What does target="_blank" do to a link? (a) makes it bold (b) opens it in a new tab (c) hides the link (d) makes it blank
  6. 6.📋 How many items does this list show?
    <ul>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Banana</li>
      <li>Orange</li>
      <li>Grapes</li>
      <li>Jamun</li>
    </ul>
  7. 7.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="250">
  8. 8.🔗 Which words do you click on?
    <a href="quiz.html">About us</a>
    (a) quiz.html (b) href (c) About us (d) Contact us
  9. 9.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <h2>Hello, world!</h2>
    <h4>My pets</h4>
    <h3>My pets</h3>
    <p>My pets</p>
  10. 10.🔗 Which words do you click on?
    <a href="https://example.com">Art corner</a>
    (a) Art corner (b) School news (c) href (d) https://example.com
  11. 11.📝 Does <title> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  12. 12.🌐 Which one saves our .html files? (a) a code editor (b) a web server (c) a web browser
  13. 13.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Planets (b) index.html (c) Class 7 Blog (d) Mars is red.
  14. 14.💬 Does the browser show comments on the page? (a) No (b) Yes
  15. 15.True or false: in <img>, src sets how wide it is. (a) False (b) True
  16. 16.True or false: <ul> is an unordered list. (a) True (b) False
  17. 17.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Guava</li>
      <li>Orange</li>
      <li>Jamun</li>
    </ul>
  18. 18.📋 How many items does this list show?
    <ul>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Guava</li>
    </ul>
  19. 19.📝 What does <br> do? (a) starts a new line (b) adds a picture (c) makes a list (d) makes text bold
  20. 20.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  21. 21.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  22. 22.True or false: a web server stores a website’s files. (a) False (b) True
  23. 23.True or false: <li> is an unordered list. (a) False (b) True
  24. 24.🧱 HTML gives a web page its ___. (a) sound (b) structure (c) speed (d) colours
  25. 25.📋 What number does the browser show next to “Mango”?
    <ol>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Orange</li>
    </ol>
  26. 26.True or false: HTML on its own can make headings. (a) True (b) False
  27. 27.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h4>Hello, world!</h4>
    <p>I love mangoes.</p>
  28. 28.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h3> or <h6>? (a) <h3> (b) <h2> (c) <h6> (d) <h1>
  29. 29.🔗 Which address opens when you click this link?
    <a href="contact.html">Art corner</a>
    (a) Art corner (b) maths.html (c) https://example.com (d) contact.html
  30. 30.🔍 Which is the odd one out? (a) shows pages from the web (b) colours code to help us (c) has an address bar (d) opens web pages for us
  31. 31.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="100">
    (a) tiger.jpg (b) kite.png (c) A tiger asleep (d) map.png
  32. 32.📝 What does <hr> draw? (a) a picture (b) a link (c) a table (d) a line across the page
  33. 33.🌐 Which one sends pages over the net? (a) a web browser (b) a web server (c) a code editor
  34. 34.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) alt (c) width (d) height
  35. 35.🔗 Which words do you click on?
    <a href="contact.html">Art corner</a>
    (a) School news (b) href (c) Art corner (d) contact.html
  36. 36.True or false: in <img>, alt shows if the image fails. (a) False (b) True
  37. 37.🔍 Which line is missing its closing tag?
    line 1: <u>Rain today
    line 2: <small>My pets</small>
    line 3: <strong>Cricket is fun.</strong>
    (a) line 3 (b) line 2 (c) line 1
  38. 38.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h1> or <h4>? (a) <h1> (b) <h2> (c) <h4> (d) <h5>
  39. 39.🔗 Which words do you click on?
    <a href="quiz.html">Art corner</a>
    (a) quiz.html (b) href (c) Art corner (d) School news
  40. 40.True or false: HTML on its own cannot pick a random number. (a) True (b) False

Answer key

  1. False
  2. </h2>
  3. 3
  4. <!DOCTYPE html>
  5. opens it in a new tab
  6. 6
  7. 250
  8. About us
  9. 4
  10. Art corner
  11. has a closing tag
  12. a code editor
  13. Class 7 Blog
  14. No
  15. False
  16. True
  17. 5
  18. 3
  19. starts a new line
  20. an opening tag
  21. No
  22. True
  23. False
  24. structure
  25. 2
  26. True
  27. 2
  28. <h6>
  29. contact.html
  30. colours code to help us
  31. tiger.jpg
  32. a line across the page
  33. a web server
  34. height
  35. Art corner
  36. True
  37. line 1
  38. <h5>
  39. Art corner
  40. True

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