← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 937 · 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.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
  2. 2.🔍 Which is the odd one out? (a) saves our .html files (b) has an address bar (c) opens web pages for us (d) turns HTML into a page
  3. 3.📋 Which list shows the steps of a recipe best? (a) <br> (b) <hr> (c) <ul> (d) <ol>
  4. 4.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) width (c) src (d) height
  5. 5.🖼️ Which attribute of <img> names the picture file? (a) height (b) alt (c) width (d) src
  6. 6.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Try this poha. (b) Welcome! (c) body (d) Class 7 Blog
  7. 7.True or false: <ul> lists things in any order. (a) False (b) True
  8. 8.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h2> or <h1>? (a) <h5> (b) <h2> (c) <h3> (d) <h1>
  9. 9.True or false: <li> is an ordered list. (a) True (b) False
  10. 10.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
  11. 11.Which of these is true of a web browser? (a) colours code to help us (b) turns HTML into a page (c) answers page requests (d) sends pages over the net
  12. 12.💬 How does an HTML comment start? (a) <!-- (b) # (c) /* (d) //
  13. 13.🔗 Which words do you click on?
    <a href="games.html">Visit the site</a>
    (a) games.html (b) Maths fun (c) href (d) Visit the site
  14. 14.🔍 One closing tag is missing. Which one?
    <h2>Hello, world!
    <em>I love mangoes.</em>
    <strong>Our school trip</strong>
    (a) </em> (b) </h2> (c) </strong> (d) </b>
  15. 15.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h6> or <h2>? (a) <h6> (b) <h1> (c) <h2> (d) <h5>
  16. 16.🏷️ Every HTML tag starts with which sign? (a) [ (b) ( (c) < (d) {
  17. 17.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="250">
    (a) tiger.jpg (b) bus.jpg (c) fort.jpg (d) Our school bus
  18. 18.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <h2>I love mangoes.</h2>
    <p>Fun facts</p>
    <h2>My best friend</h2>
  19. 19.True or false: HTML on its own cannot show paragraphs. (a) True (b) False
  20. 20.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ul> (c) <ol>
  21. 21.💾 A web page file usually ends with which extension? (a) .mp3 (b) .png (c) .html (d) .txt
  22. 22.🔗 Which address opens when you click this link?
    <a href="https://example.com">Contact us</a>
    (a) art.html (b) https://example.com (c) Contact us (d) maths.html
  23. 23.🔗 Which tag makes a clickable link? (a) <img> (b) <p> (c) <a> (d) <link>
  24. 24.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>My pets</p>
    <p>The red kite</p>
    <h2>My best friend</h2>
  25. 25.Which of these is an empty tag? (a) <ul> (b) <h1> (c) <p> (d) <br>
  26. 26.Which of these is true of a web browser? (a) has an address bar (b) sends pages over the net (c) stores a website’s files (d) colours code to help us
  27. 27.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>I love mangoes.</p>
    <p>My pets</p>
    <h2>My pets</h2>
  28. 28.True or false: <input> is an empty tag. (a) False (b) True
  29. 29.🔢 In a basic web page file, which comes LAST? (a) <head> (b) </html> (c) <!DOCTYPE html> (d) <body>
  30. 30.True or false: in <img>, width describes the picture. (a) False (b) True
  31. 31.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a alt="about.html">
  32. 32.📋 How many items does this list show?
    <ul>
      <li>Guava</li>
      <li>Banana</li>
      <li>Grapes</li>
    </ul>
  33. 33.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  34. 34.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="300">
  35. 35.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <!-- <p>Fun facts</p> -->
    <p>My best friend</p>
    <p>Good morning!</p>
    (a) Fun facts (b) My pets (c) My best friend (d) Good morning!
  36. 36.📝 Does <img> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  37. 37.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Grapes</li>
    </ol>
  38. 38.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  39. 39.True or false: <ul> goes in the body. (a) True (b) False
  40. 40.🔗 What does target="_blank" do to a link? (a) makes it blank (b) makes it bold (c) opens it in a new tab (d) hides the link

Answer key

  1. in the head
  2. saves our .html files
  3. <ol>
  4. height
  5. src
  6. Welcome!
  7. True
  8. <h1>
  9. False
  10. in the head
  11. turns HTML into a page
  12. <!--
  13. Visit the site
  14. </h2>
  15. <h6>
  16. <
  17. bus.jpg
  18. 2
  19. False
  20. <ol>
  21. .html
  22. https://example.com
  23. <a>
  24. 2
  25. <br>
  26. has an address bar
  27. 2
  28. True
  29. </html>
  30. False
  31. <a href="about.html">
  32. 3
  33. an opening tag
  34. 300
  35. Fun facts
  36. an empty tag
  37. 2
  38. an opening tag
  39. True
  40. opens it in a new tab

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