← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 221 · 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.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <link about.html> (c) <a src="about.html"> (d) <a alt="about.html">
  2. 2.Which of these has a closing tag? (a) <hr> (b) <p> (c) <img> (d) <br>
  3. 3.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <style> (c) <ul> (d) <link rel="stylesheet">
  4. 4.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) height (c) width (d) alt
  5. 5.📋 How many items does this list show?
    <ul>
      <li>Orange</li>
      <li>Mango</li>
    </ul>
  6. 6.True or false: HTML on its own can show paragraphs. (a) False (b) True
  7. 7.💬 How does an HTML comment start? (a) // (b) # (c) /* (d) <!--
  8. 8.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>Our school trip</p>
    <p>Fun facts</p>
    <p>Good morning!</p>
    <!-- <p>I love mangoes.</p> -->
  9. 9.📝 What does <p> make? (a) a picture (b) a link (c) a paragraph (d) a table
  10. 10.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>My pets</p>
    <h4>Hello, world!</h4>
  11. 11.🔗 Which address opens when you click this link?
    <a href="quiz.html">Art corner</a>
    (a) games.html (b) Art corner (c) about.html (d) quiz.html
  12. 12.Which of these is true of a web server? (a) shows pages from the web (b) stores a website’s files (c) colours code to help us (d) has an address bar
  13. 13.🔍 Which is the odd one out? (a) sends pages over the net (b) shows line numbers (c) stores a website’s files (d) hosts websites online
  14. 14.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  15. 15.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>Rain today</p>
    <p>Hello, world!</p>
    <!-- <p>Good morning!</p> -->
    (a) Rain today (b) The red kite (c) Good morning! (d) Hello, world!
  16. 16.Which of these is an opening tag? (a) </b> (b) </li> (c) </p> (d) <h1>
  17. 17.True or false: in <img>, src tells which image to load. (a) True (b) False
  18. 18.🔗 What does HyperText mean? (a) very big text (b) text with links (c) text in colour (d) secret text
  19. 19.💬 Does the browser show comments on the page? (a) Yes (b) No
  20. 20.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Thanks for visiting. (b) body (c) Class 7 Blog (d) Planets
  21. 21.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <p>Our school trip</p>
    <!-- <p>Rain today</p> -->
    <!-- <p>Fun facts</p> -->
  22. 22.📝 What does <hr> draw? (a) a table (b) a line across the page (c) a picture (d) a link
  23. 23.Which of these is an opening tag? (a) </b> (b) </li> (c) <li> (d) </p>
  24. 24.🔗 Which address opens when you click this link?
    <a href="games.html">School news</a>
    (a) about.html (b) games.html (c) contact.html (d) School news
  25. 25.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ul> (c) <br> (d) <ol>
  26. 26.🔗 Which address opens when you click this link?
    <a href="art.html">Visit the site</a>
    (a) news.html (b) art.html (c) quiz.html (d) Visit the site
  27. 27.🔗 Which words do you click on?
    <a href="maths.html">Play games</a>
    (a) Play games (b) maths.html (c) href (d) About us
  28. 28.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  29. 29.🏷️ Every HTML tag starts with which sign? (a) [ (b) ( (c) < (d) {
  30. 30.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="300">
    (a) Map of India (b) Birthday cake (c) width (d) map.png
  31. 31.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>Our school trip</p>
    <!-- <p>My best friend</p> -->
    (a) My best friend (b) Our school trip (c) Fun facts
  32. 32.📋 How many items does this list show?
    <ol>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Guava</li>
      <li>Mango</li>
      <li>Orange</li>
    </ol>
  33. 33.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="250">
    (a) tiger.jpg (b) A red kite (c) A tiger asleep (d) width
  34. 34.🔠 Which tag is the least important heading? (a) <p> (b) <h1> (c) <h6> (d) <h3>
  35. 35.True or false: a web server hosts websites online. (a) False (b) True
  36. 36.📛 In <a href="x.html">, what is href? (a) a closing tag (b) a comment (c) an element name (d) an attribute
  37. 37.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h4> or <h2>? (a) <h2> (b) <h1> (c) <h4> (d) <h6>
  38. 38.True or false: <ol> is an ordered list. (a) False (b) True
  39. 39.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
  40. 40.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to make it bigger (c) to colour it (d) to load it faster

Answer key

  1. <a href="about.html">
  2. <p>
  3. <ul>
  4. alt
  5. 2
  6. True
  7. <!--
  8. 3
  9. a paragraph
  10. 2
  11. quiz.html
  12. stores a website’s files
  13. shows line numbers
  14. Yes
  15. Good morning!
  16. <h1>
  17. True
  18. text with links
  19. No
  20. Planets
  21. 2
  22. a line across the page
  23. <li>
  24. games.html
  25. <ul>
  26. art.html
  27. Play games
  28. a closing tag
  29. <
  30. Map of India
  31. My best friend
  32. 6
  33. A tiger asleep
  34. <h6>
  35. True
  36. an attribute
  37. <h6>
  38. True
  39. in the head
  40. to describe the image

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