← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 60 · 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.🏷️ Every HTML tag starts with which sign? (a) < (b) ( (c) { (d) [
  2. 2.Which of these has a closing tag? (a) <hr> (b) <meta> (c) <img> (d) <p>
  3. 3.True or false: <ul> goes in the body. (a) False (b) True
  4. 4.🔗 Which address opens when you click this link?
    <a href="contact.html">Visit the site</a>
    (a) maths.html (b) https://example.com (c) contact.html (d) Visit the site
  5. 5.Which of these is an empty tag? (a) <img> (b) <p> (c) <b> (d) <li>
  6. 6.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <h4>Hello, world!</h4>
    <p>I love mangoes.</p>
  7. 7.True or false: <b> is an empty tag. (a) False (b) True
  8. 8.📋 Does this list show bullets or numbers?
    <ul>
      <li>Mango</li>
      <li>Papaya</li>
    </ul>
    (a) bullets (b) numbers
  9. 9.💬 How does an HTML comment start? (a) /* (b) <!-- (c) // (d) #
  10. 10.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) src (d) href
  11. 11.🔍 Which line is missing its closing tag?
    line 1: <p>Cricket is fun.</p>
    line 2: <u>Rain today
    line 3: <h1>My pets</h1>
    (a) line 1 (b) line 2 (c) line 3
  12. 12.🏷️ Which is the closing tag for <h2>? (a) <h2> (b) <\h2> (c) <h2/> (d) </h2>
  13. 13.🔠 Are headings shown in bold by default? (a) Yes (b) No
  14. 14.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="350">
    (a) dog.jpg (b) The full moon (c) A happy dog (d) width
  15. 15.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="250">
  16. 16.💬 Which text will NOT show on the page?
    <!-- <p>The red kite</p> -->
    <p>My best friend</p>
    <p>Our school trip</p>
    (a) Our school trip (b) My best friend (c) The red kite
  17. 17.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>My best friend</p>
    <p>I love mangoes.</p>
    <p>Good morning!</p>
    <h2>My pets</h2>
  18. 18.🏷️ HTML marks up text using ___. (a) keys (b) pixels (c) tags (d) wires
  19. 19.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) body (b) Match report (c) My Hobbies (d) We won by 5 runs.
  20. 20.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="200">
    (a) kite.png (b) A red kite (c) Map of India (d) width
  21. 21.🌐 Which one turns HTML into a page? (a) a web browser (b) a web server (c) a code editor
  22. 22.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <p>My pets</p>
    <h2>Hello, world!</h2>
  23. 23.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h2> or <h5>? (a) <h2> (b) <h6> (c) <h3> (d) <h5>
  24. 24.📋 What number does the browser show next to “Grapes”?
    <ol>
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Orange</li>
      <li>Grapes</li>
    </ol>
  25. 25.🔗 What does HyperText mean? (a) very big text (b) text in colour (c) text with links (d) secret text
  26. 26.True or false: <img> is an empty tag. (a) False (b) True
  27. 27.True or false: <li> goes inside ul or ol. (a) False (b) True
  28. 28.🔗 Which address opens when you click this link?
    <a href="games.html">Play games</a>
    (a) about.html (b) Play games (c) contact.html (d) games.html
  29. 29.📋 Which list tag lists steps in order? (a) <li> (b) <ol> (c) <ul>
  30. 30.True or false: <meta charset="utf-8"> goes in the head. (a) False (b) True
  31. 31.Which of these goes in the head? (a) <table> (b) <img> (c) <meta charset="utf-8"> (d) <h1>
  32. 32.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <br> (c) <h1> (d) <p>
  33. 33.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
    <!-- <p>My best friend</p> -->
    (a) My best friend (b) I love mangoes. (c) Cricket is fun.
  34. 34.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
  35. 35.📝 What does <p> make? (a) a link (b) a picture (c) a paragraph (d) a table
  36. 36.🔗 Which words do you click on?
    <a href="maths.html">Art corner</a>
    (a) School news (b) href (c) maths.html (d) Art corner
  37. 37.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  38. 38.Which of these is an opening tag? (a) </title> (b) <b> (c) </p> (d) </b>
  39. 39.📝 What does <br> do? (a) makes a list (b) adds a picture (c) starts a new line (d) makes text bold
  40. 40.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Good morning!</p>
    <!-- <p>My best friend</p> -->

Answer key

  1. <
  2. <p>
  3. True
  4. contact.html
  5. <img>
  6. 2
  7. False
  8. bullets
  9. <!--
  10. href
  11. line 2
  12. </h2>
  13. Yes
  14. A happy dog
  15. 250
  16. The red kite
  17. 4
  18. tags
  19. Match report
  20. A red kite
  21. a web browser
  22. 2
  23. <h2>
  24. 5
  25. text with links
  26. True
  27. True
  28. games.html
  29. <ol>
  30. True
  31. <meta charset="utf-8">
  32. <h1>
  33. My best friend
  34. in the head
  35. a paragraph
  36. Art corner
  37. an opening tag
  38. <b>
  39. starts a new line
  40. 2

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