← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 702 · 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: <style> goes in the body. (a) False (b) True
  2. 2.🌐 Which one hosts websites online? (a) a web browser (b) a web server (c) a code editor
  3. 3.True or false: <li> is one item of a list. (a) False (b) True
  4. 4.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
  5. 5.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) body (b) Easy snacks (c) Class 7 Blog (d) We won by 5 runs.
  6. 6.Which of these is an opening tag? (a) </h1> (b) </p> (c) <title> (d) </li>
  7. 7.🔗 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
  8. 8.📋 How many items does this list show?
    <ol>
      <li>Mango</li>
      <li>Guava</li>
    </ol>
  9. 9.True or false: <ol> lists things in any order. (a) True (b) False
  10. 10.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 4 (d) 3
  11. 11.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <!-- <p>My best friend</p> -->
    <p>The red kite</p>
  12. 12.📋 Which list tag is one item of a list? (a) <ol> (b) <ul> (c) <li>
  13. 13.💬 Does the browser show comments on the page? (a) No (b) Yes
  14. 14.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="150">
    (a) kite.png (b) An old fort (c) fort.jpg (d) tiger.jpg
  15. 15.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>The red kite</p>
    <h4>Cricket is fun.</h4>
    <p>My pets</p>
  16. 16.🔗 Which words do you click on?
    <a href="contact.html">Visit the site</a>
    (a) Maths fun (b) Visit the site (c) contact.html (d) href
  17. 17.🔗 Where does this link open?
    <a href="https://example.com" target="_blank">Visit the site</a>
    (a) in a new tab (b) in the same tab
  18. 18.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="350">
  19. 19.True or false: <a> goes in the head. (a) False (b) True
  20. 20.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h3> or <h5>? (a) <h1> (b) <h6> (c) <h5> (d) <h3>
  21. 21.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h5> or <h2>? (a) <h1> (b) <h6> (c) <h5> (d) <h2>
  22. 22.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  23. 23.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h2> or <h6>? (a) <h6> (b) <h3> (c) <h2> (d) <h1>
  24. 24.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h6> or <h1>? (a) <h1> (b) <h2> (c) <h6> (d) <h3>
  25. 25.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="350">
    (a) map.png (b) kite.png (c) cake.jpg (d) A red kite
  26. 26.Which of these is true of a web server? (a) turns HTML into a page (b) stores a website’s files (c) shows line numbers (d) shows pages from the web
  27. 27.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  28. 28.🏷️ Every HTML tag starts with which sign? (a) < (b) ( (c) { (d) [
  29. 29.🖼️ 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
  30. 30.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <p>My best friend</p>
    <!-- <p>Rain today</p> -->
    (a) My best friend (b) Our school trip (c) Rain today
  31. 31.🔤 In “HTML”, what does the L stand for? (a) Link (b) Line (c) Language (d) Laptop
  32. 32.True or false: a code editor is where we type code. (a) False (b) True
  33. 33.📋 How many items does this list show?
    <ol>
      <li>Banana</li>
      <li>Litchi</li>
      <li>Papaya</li>
      <li>Orange</li>
    </ol>
  34. 34.Which of these is true of a web browser? (a) opens web pages for us (b) shows line numbers (c) answers page requests (d) stores a website’s files
  35. 35.🔠 Are headings shown in bold by default? (a) No (b) Yes
  36. 36.True or false: a web browser opens web pages for us. (a) False (b) True
  37. 37.🏷️ Which is the closing tag for <small>? (a) <\small> (b) <small/> (c) <small> (d) </small>
  38. 38.📋 Which tag goes around each item of a list? (a) <p> (b) <li> (c) <ul> (d) <ol>
  39. 39.True or false: a web server is where we type code. (a) True (b) False
  40. 40.True or false: <h1> goes in the body. (a) False (b) True

Answer key

  1. False
  2. a web server
  3. True
  4. in the body
  5. Easy snacks
  6. <title>
  7. opens it in a new tab
  8. 2
  9. False
  10. 6
  11. 1
  12. <li>
  13. No
  14. fort.jpg
  15. 2
  16. Visit the site
  17. in a new tab
  18. 350
  19. False
  20. <h1>
  21. <h6>
  22. has a closing tag
  23. <h1>
  24. <h1>
  25. kite.png
  26. stores a website’s files
  27. a closing tag
  28. <
  29. to describe the image
  30. Rain today
  31. Language
  32. True
  33. 4
  34. opens web pages for us
  35. Yes
  36. True
  37. </small>
  38. <li>
  39. False
  40. True

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