← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 714 · 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 do we need to write HTML? (a) a paintbrush (b) a plain text editor (c) a printer (d) a microphone
  2. 2.True or false: <table> goes in the body. (a) False (b) True
  3. 3.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  4. 4.🔍 One closing tag is missing. Which one?
    <u>My pets</u>
    <h1>Cricket is fun.
    <h2>Good morning!</h2>
    (a) </u> (b) </i> (c) </h1> (d) </h2>
  5. 5.Which of these is an opening tag? (a) </p> (b) </body> (c) </li> (d) <li>
  6. 6.💬 Why do coders write comments? (a) to show pictures (b) to make links (c) to leave notes (d) to add colour
  7. 7.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h3> or <h2>? (a) <h1> (b) <h6> (c) <h2> (d) <h3>
  8. 8.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>Hello, world!</p>
    <!-- <p>I love mangoes.</p> -->
    (a) Hello, world! (b) The red kite (c) I love mangoes.
  9. 9.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) Match report (b) Class 7 Blog (c) We won by 5 runs. (d) index.html
  10. 10.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>I love mangoes.</p>
    <p>Fun facts</p>
    (a) Rain today (b) Cricket is fun. (c) Fun facts (d) I love mangoes.
  11. 11.🔠 Which heading shows the SMALLEST text: <h6>, <h2>, <h4> or <h3>? (a) <h6> (b) <h2> (c) <h3> (d) <h4>
  12. 12.📝 What does <hr> draw? (a) a line across the page (b) a picture (c) a table (d) a link
  13. 13.🔍 One closing tag is missing. Which one?
    <h3>My pets
    <b>Hello, world!</b>
    <u>Cricket is fun.</u>
    (a) </b> (b) </u> (c) </h3> (d) </em>
  14. 14.🔗 What does target="_blank" do to a link? (a) makes it bold (b) makes it blank (c) opens it in a new tab (d) hides the link
  15. 15.🔢 In a basic web page file, which comes LAST? (a) <body> (b) </head> (c) </html> (d) </body>
  16. 16.True or false: <ol> is an ordered list. (a) True (b) False
  17. 17.🏷️ Every HTML tag starts with which sign? (a) [ (b) ( (c) { (d) <
  18. 18.🔗 Which address opens when you click this link?
    <a href="art.html">Contact us</a>
    (a) quiz.html (b) news.html (c) Contact us (d) art.html
  19. 19.🔍 Which is the odd one out? (a) shows pages from the web (b) opens web pages for us (c) turns HTML into a page (d) is where we type code
  20. 20.📋 Which list tag lists things in any order? (a) <ol> (b) <ul> (c) <li>
  21. 21.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="50">
  22. 22.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <p>I love mangoes.</p>
    <p>Our school trip</p>
    <!-- <p>My best friend</p> -->
    (a) My best friend (b) I love mangoes. (c) Rain today (d) Our school trip
  23. 23.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <p> (c) <style> (d) <title>
  24. 24.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) <\h1> (c) </h1> (d) <h1/>
  25. 25.📋 What number does the browser show next to “Guava”?
    <ol>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Guava</li>
      <li>Papaya</li>
      <li>Jamun</li>
    </ol>
  26. 26.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “</head>”? (a) <!DOCTYPE html> (b) </head>
  27. 27.Which of these has a closing tag? (a) <hr> (b) <p> (c) <img> (d) <meta>
  28. 28.Which of these goes in the body? (a) <style> (b) <title> (c) <h1> (d) <meta charset="utf-8">
  29. 29.🔍 Which line is missing its closing tag?
    line 1: <h2>Hello, world!</h2>
    line 2: <h1>My best friend
    line 3: <i>Good morning!</i>
    (a) line 3 (b) line 2 (c) line 1
  30. 30.🔗 What does HyperText mean? (a) text in colour (b) secret text (c) text with links (d) very big text
  31. 31.🔗 Where does this link open?
    <a href="https://example.com">Maths fun</a>
    (a) in the same tab (b) in a new tab
  32. 32.True or false: <title> has a closing tag. (a) False (b) True
  33. 33.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) address (c) element (d) attribute
  34. 34.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>Our school trip</p>
    <h4>Hello, world!</h4>
    <p>The red kite</p>
  35. 35.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  36. 36.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 1 (c) 10 (d) 3
  37. 37.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
  38. 38.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) My drawings (b) body (c) Thanks for visiting. (d) Cricket Club
  39. 39.📝 What does <p> make? (a) a link (b) a table (c) a paragraph (d) a picture
  40. 40.📋 How many items does this list show?
    <ul>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Papaya</li>
      <li>Grapes</li>
    </ul>

Answer key

  1. a plain text editor
  2. True
  3. an opening tag
  4. </h1>
  5. <li>
  6. to leave notes
  7. <h6>
  8. I love mangoes.
  9. Class 7 Blog
  10. Cricket is fun.
  11. <h6>
  12. a line across the page
  13. </h3>
  14. opens it in a new tab
  15. </html>
  16. True
  17. <
  18. art.html
  19. is where we type code
  20. <ul>
  21. 50
  22. My best friend
  23. <p>
  24. </h1>
  25. 3
  26. <!DOCTYPE html>
  27. <p>
  28. <h1>
  29. line 2
  30. text with links
  31. in the same tab
  32. True
  33. element
  34. 2
  35. No
  36. 1
  37. Yes
  38. My drawings
  39. a paragraph
  40. 4

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