← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 254 · 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.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Try this poha. (b) Class 7 Blog (c) My drawings (d) body
  2. 2.🔗 Which address opens when you click this link?
    <a href="https://example.com">Take the quiz</a>
    (a) maths.html (b) https://example.com (c) art.html (d) Take the quiz
  3. 3.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h3> or <h4>? (a) <h2> (b) <h4> (c) <h1> (d) <h3>
  4. 4.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Birds sing<br>Sky is blue</p>
  5. 5.True or false: <input> is an empty tag. (a) True (b) False
  6. 6.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Roses are red</p>
  7. 7.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>Our school trip</p>
    <p>My best friend</p>
    <!-- <p>I love mangoes.</p> -->
    (a) My best friend (b) Good morning! (c) Our school trip (d) I love mangoes.
  8. 8.📋 Does this list show bullets or numbers?
    <ul>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Banana</li>
    </ul>
    (a) bullets (b) numbers
  9. 9.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a href="about.html"> (c) <link about.html> (d) <a src="about.html">
  10. 10.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="250">
    (a) tiger.jpg (b) kite.png (c) map.png (d) A tiger asleep
  11. 11.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <p>Rain today</p>
    <!-- <p>Our school trip</p> -->
  12. 12.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  13. 13.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Birds sing<br>Rivers flow</p>
  14. 14.True or false: <p> goes in the head. (a) False (b) True
  15. 15.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
  16. 16.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h1> or <h2>? (a) <h4> (b) <h2> (c) <h5> (d) <h1>
  17. 17.True or false: HTML on its own can pick a random number. (a) True (b) False
  18. 18.True or false: a web browser turns HTML into a page. (a) True (b) False
  19. 19.🔍 Which is the odd one out? (a) has an address bar (b) opens web pages for us (c) stores a website’s files (d) shows pages from the web
  20. 20.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h3> or <h1>? (a) <h5> (b) <h3> (c) <h2> (d) <h1>
  21. 21.🌐 Which one has an address bar? (a) a web server (b) a code editor (c) a web browser
  22. 22.📝 What does <br> do? (a) adds a picture (b) makes text bold (c) starts a new line (d) makes a list
  23. 23.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>My best friend</p>
    <p>My pets</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>I love mangoes.</p>
  24. 24.True or false: <title> goes in the head. (a) False (b) True
  25. 25.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as 5 spaces (c) as a dot (d) as one space
  26. 26.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="250">
    (a) map.png (b) cake.jpg (c) A red kite (d) kite.png
  27. 27.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Orange</li>
      <li>Grapes</li>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Litchi</li>
    </ol>
  28. 28.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>Cricket is fun.</p>
    <p>Hello, world!</p>
    <p>The red kite</p>
    <p>I love mangoes.</p>
  29. 29.🔍 One closing tag is missing. Which one?
    <u>Good morning!
    <small>The red kite</small>
    <h2>Cricket is fun.</h2>
    (a) </u> (b) </h1> (c) </h2> (d) </small>
  30. 30.🔗 Which address opens when you click this link?
    <a href="about.html">Visit the site</a>
    (a) https://example.com (b) contact.html (c) Visit the site (d) about.html
  31. 31.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  32. 32.🖼️ Why do we add alt text to an image? (a) to colour it (b) to load it faster (c) to describe the image (d) to make it bigger
  33. 33.📄 Where does the text of <title> appear? (a) nowhere (b) in a big heading (c) on the browser tab (d) at the bottom
  34. 34.💬 How does an HTML comment start? (a) /* (b) # (c) // (d) <!--
  35. 35.📝 Does <meta> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  36. 36.🌐 Which one opens web pages for us? (a) a web server (b) a code editor (c) a web browser
  37. 37.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="100">
  38. 38.🔍 Which line is missing its closing tag?
    line 1: <b>I love mangoes.</b>
    line 2: <p>Fun facts</p>
    line 3: <h1>Good morning!
    (a) line 1 (b) line 2 (c) line 3
  39. 39.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) height (c) width (d) alt
  40. 40.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h2> or <h3>? (a) <h2> (b) <h4> (c) <h6> (d) <h3>

Answer key

  1. My drawings
  2. https://example.com
  3. <h4>
  4. 3
  5. True
  6. 2
  7. I love mangoes.
  8. bullets
  9. <a href="about.html">
  10. tiger.jpg
  11. 2
  12. in the head
  13. 3
  14. False
  15. No
  16. <h1>
  17. False
  18. True
  19. stores a website’s files
  20. <h1>
  21. a web browser
  22. starts a new line
  23. 3
  24. True
  25. as one space
  26. kite.png
  27. 6
  28. 1
  29. </u>
  30. about.html
  31. No
  32. to describe the image
  33. on the browser tab
  34. <!--
  35. an empty tag
  36. a web browser
  37. 100
  38. line 3
  39. alt
  40. <h2>

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