← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 872 · 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 does <br> do? (a) makes a list (b) makes text bold (c) adds a picture (d) starts a new line
  2. 2.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
    <h2>My best friend</h2>
    <p>Rain today</p>
  3. 3.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <!-- <p>I love mangoes.</p> -->
    <p>My best friend</p>
    (a) My best friend (b) I love mangoes. (c) The red kite
  4. 4.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Our school trip</p>
    <!-- <p>My best friend</p> -->
    <!-- <p>The red kite</p> -->
    <!-- <p>Cricket is fun.</p> -->
  5. 5.True or false: HTML on its own cannot make bullet lists. (a) False (b) True
  6. 6.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <h1> (c) <br> (d) <p>
  7. 7.🔗 Which address opens when you click this link?
    <a href="contact.html">Art corner</a>
    (a) Art corner (b) maths.html (c) contact.html (d) https://example.com
  8. 8.🔗 Which words do you click on?
    <a href="quiz.html">About us</a>
    (a) About us (b) href (c) quiz.html (d) Contact us
  9. 9.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  10. 10.🔗 Which attribute holds the address of a link? (a) id (b) src (c) href (d) alt
  11. 11.🏷️ Which is the closing tag for <h1>? (a) <\h1> (b) <h1/> (c) </h1> (d) <h1>
  12. 12.🌐 Which one answers page requests? (a) a web server (b) a web browser (c) a code editor
  13. 13.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ol> (c) <ul>
  14. 14.🔍 Which line is missing its closing tag?
    line 1: <strong>Rain today</strong>
    line 2: <small>My pets
    line 3: <h1>Good morning!</h1>
    (a) line 2 (b) line 3 (c) line 1
  15. 15.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <!-- <p>Good morning!</p> -->
    <!-- <p>My best friend</p> -->
  16. 16.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  17. 17.🔗 Which words do you click on?
    <a href="about.html">Take the quiz</a>
    (a) Play games (b) about.html (c) Take the quiz (d) href
  18. 18.📋 How many items does this list show?
    <ul>
      <li>Grapes</li>
      <li>Litchi</li>
    </ul>
  19. 19.🔍 One closing tag is missing. Which one?
    <u>Rain today</u>
    <h2>Fun facts
    <p>Hello, world!</p>
    (a) </h2> (b) </u> (c) </p> (d) </h1>
  20. 20.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  21. 21.🏷️ HTML marks up text using ___. (a) wires (b) tags (c) pixels (d) keys
  22. 22.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="250">
    (a) A happy dog (b) Birthday cake (c) width (d) cake.jpg
  23. 23.💬 Does the browser show comments on the page? (a) No (b) Yes
  24. 24.🔍 Which line is missing its closing tag?
    line 1: <small>Our school trip</small>
    line 2: <strong>Good morning!
    line 3: <h1>Rain today</h1>
    (a) line 2 (b) line 3 (c) line 1
  25. 25.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a src="about.html">
  26. 26.📋 Which list tag is one item of a list? (a) <li> (b) <ol> (c) <ul>
  27. 27.🏷️ Is </p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  28. 28.True or false: <ol> lists steps in order. (a) True (b) False
  29. 29.🔍 One closing tag is missing. Which one?
    <b>Our school trip</b>
    <small>My pets
    <em>Cricket is fun.</em>
    (a) </b> (b) </small> (c) </i> (d) </em>
  30. 30.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 1 (c) 6 (d) 3
  31. 31.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="200">
  32. 32.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <head> (c) <body> (d) <html>
  33. 33.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) Class 7 Blog (b) index.html (c) We won by 5 runs. (d) Welcome!
  34. 34.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Banana</li>
    </ul>
  35. 35.📄 Can HTML on its own keep a high score? (a) Yes (b) No
  36. 36.Which of these is a closing tag? (a) <p> (b) <body> (c) </li> (d) <h1>
  37. 37.📋 How many items does this list show?
    <ol>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Litchi</li>
    </ol>
  38. 38.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) editor (c) element (d) attribute
  39. 39.🔍 Which is the odd one out? (a) answers page requests (b) stores a website’s files (c) is where we type code (d) hosts websites online
  40. 40.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body

Answer key

  1. starts a new line
  2. 3
  3. I love mangoes.
  4. 1
  5. False
  6. <h1>
  7. contact.html
  8. About us
  9. No
  10. href
  11. </h1>
  12. a web server
  13. <ol>
  14. line 2
  15. 1
  16. has a closing tag
  17. Take the quiz
  18. 2
  19. </h2>
  20. Yes
  21. tags
  22. Birthday cake
  23. No
  24. line 2
  25. <a href="about.html">
  26. <li>
  27. a closing tag
  28. True
  29. </small>
  30. 1
  31. 200
  32. <!DOCTYPE html>
  33. Class 7 Blog
  34. 2
  35. No
  36. </li>
  37. 3
  38. element
  39. is where we type code
  40. in the body

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