← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 32 · 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 of these is true of a web server? (a) answers page requests (b) colours code to help us (c) is where we type code (d) turns HTML into a page
  2. 2.📋 Does this list show bullets or numbers?
    <ul>
      <li>Guava</li>
      <li>Litchi</li>
    </ul>
    (a) bullets (b) numbers
  3. 3.🔢 In a basic web page file, which comes first: “</body>” or “<head>”? (a) <head> (b) </body>
  4. 4.True or false: <link rel="stylesheet"> goes in the body. (a) False (b) True
  5. 5.📄 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) body (b) Try this poha. (c) Class 7 Blog (d) My drawings
  6. 6.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h4>My pets</h4>
    <h4>Our school trip</h4>
    <h3>My pets</h3>
  7. 7.📋 How many items does this list show?
    <ul>
      <li>Papaya</li>
      <li>Mango</li>
      <li>Litchi</li>
    </ul>
  8. 8.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h5> or <h3>? (a) <h3> (b) <h6> (c) <h1> (d) <h5>
  9. 9.🔗 Which words do you click on?
    <a href="art.html">Maths fun</a>
    (a) art.html (b) Art corner (c) Maths fun (d) href
  10. 10.True or false: <a> goes in the body. (a) True (b) False
  11. 11.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <h2>I love mangoes.</h2>
    <p>The red kite</p>
  12. 12.📋 What number does the browser show next to “Jamun”?
    <ol>
      <li>Guava</li>
      <li>Jamun</li>
      <li>Litchi</li>
    </ol>
  13. 13.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
  14. 14.🏷️ Every HTML tag starts with which sign? (a) [ (b) < (c) { (d) (
  15. 15.📝 What does <br> do? (a) makes text bold (b) adds a picture (c) makes a list (d) starts a new line
  16. 16.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="400">
    (a) tiger.jpg (b) A red kite (c) A tiger asleep (d) width
  17. 17.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
  18. 18.🔠 Which tag is the least important heading? (a) <h6> (b) <h1> (c) <p> (d) <h3>
  19. 19.🖼️ Which tag puts a picture on a page? (a) <a> (b) <img> (c) <pic> (d) <p>
  20. 20.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h5> or <h6>? (a) <h3> (b) <h6> (c) <h5> (d) <h2>
  21. 21.Which of these is an empty tag? (a) <ul> (b) <h1> (c) <title> (d) <meta>
  22. 22.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
  23. 23.📄 Where does <table> go: in the head or in the body? (a) in the head (b) in the body
  24. 24.📄 Can HTML on its own count button clicks? (a) No (b) Yes
  25. 25.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h1> or <h3>? (a) <h6> (b) <h1> (c) <h3> (d) <h2>
  26. 26.Which of these is true of a web browser? (a) sends pages over the net (b) colours code to help us (c) has an address bar (d) saves our .html files
  27. 27.🏷️ Which is the closing tag for <u>? (a) <u/> (b) <u> (c) <\u> (d) </u>
  28. 28.🔍 Which is the odd one out? (a) sends pages over the net (b) is where we type code (c) hosts websites online (d) answers page requests
  29. 29.🏷️ Which is the closing tag for <b>? (a) </b> (b) <b> (c) <b/> (d) <\b>
  30. 30.🌐 Which one stores a website’s files? (a) a web browser (b) a web server (c) a code editor
  31. 31.📄 What is the first line of an HTML5 page? (a) <html> (b) <body> (c) <head> (d) <!DOCTYPE html>
  32. 32.💬 How does an HTML comment start? (a) /* (b) // (c) <!-- (d) #
  33. 33.📋 Does this list show bullets or numbers?
    <ul>
      <li>Jamun</li>
      <li>Banana</li>
    </ul>
    (a) numbers (b) bullets
  34. 34.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <h2>Fun facts</h2>
    <h3>I love mangoes.</h3>
  35. 35.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h5> or <h1>? (a) <h1> (b) <h2> (c) <h6> (d) <h5>
  36. 36.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) makes it bold (d) opens it in a new tab
  37. 37.True or false: <img> has a closing tag. (a) True (b) False
  38. 38.Which of these is an opening tag? (a) </body> (b) </b> (c) </h1> (d) <h1>
  39. 39.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  40. 40.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as a dot (c) as 5 spaces (d) as one space

Answer key

  1. answers page requests
  2. bullets
  3. <head>
  4. False
  5. My drawings
  6. 4
  7. 3
  8. <h6>
  9. Maths fun
  10. True
  11. 2
  12. 2
  13. in the body
  14. <
  15. starts a new line
  16. A tiger asleep
  17. in the body
  18. <h6>
  19. <img>
  20. <h6>
  21. <meta>
  22. in the body
  23. in the body
  24. No
  25. <h1>
  26. has an address bar
  27. </u>
  28. is where we type code
  29. </b>
  30. a web server
  31. <!DOCTYPE html>
  32. <!--
  33. bullets
  34. 3
  35. <h6>
  36. opens it in a new tab
  37. False
  38. <h1>
  39. Yes
  40. as one space

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