← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 547 · 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 an opening tag? (a) <p> (b) </b> (c) </h1> (d) </p>
  2. 2.📋 What number does the browser show next to “Litchi”?
    <ol start="2">
      <li>Banana</li>
      <li>Litchi</li>
      <li>Mango</li>
      <li>Guava</li>
      <li>Jamun</li>
    </ol>
  3. 3.🔠 Which tag is the least important heading? (a) <h3> (b) <h6> (c) <h1> (d) <p>
  4. 4.📋 What number does the browser show next to “Mango”?
    <ol start="9">
      <li>Orange</li>
      <li>Mango</li>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Grapes</li>
    </ol>
  5. 5.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  6. 6.🔗 Which address opens when you click this link?
    <a href="about.html">About us</a>
    (a) About us (b) contact.html (c) https://example.com (d) about.html
  7. 7.🔍 Which is the odd one out? (a) turns HTML into a page (b) is where we type code (c) opens web pages for us (d) shows pages from the web
  8. 8.🔗 Which words do you click on?
    <a href="art.html">About us</a>
    (a) art.html (b) href (c) About us (d) Contact us
  9. 9.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="200">
    (a) A happy dog (b) dog.jpg (c) moon.png (d) bus.jpg
  10. 10.🏷️ Every HTML tag starts with which sign? (a) [ (b) ( (c) < (d) {
  11. 11.📋 Which tag goes around each item of a list? (a) <p> (b) <ul> (c) <li> (d) <ol>
  12. 12.📄 Which part holds everything you see on the page? (a) the head (b) the doctype (c) the title (d) the body
  13. 13.🌐 Which one colours code to help us? (a) a code editor (b) a web browser (c) a web server
  14. 14.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Stars shine<br>Kites fly high</p>
  15. 15.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <p>My pets</p>
    <h2>Hello, world!</h2>
    <p>My pets</p>
    <p>My pets</p>
    <p>My pets</p>
  16. 16.🔍 Which is the odd one out? (a) shows pages from the web (b) saves our .html files (c) turns HTML into a page (d) opens web pages for us
  17. 17.📋 Which list tag lists steps in order? (a) <li> (b) <ol> (c) <ul>
  18. 18.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  19. 19.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to add colour (d) to make links
  20. 20.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) element (c) attribute (d) editor
  21. 21.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="100">
    (a) width (b) A red kite (c) kite.png (d) Map of India
  22. 22.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <p>Rain today</p>
    <h2>Rain today</h2>
  23. 23.💬 How does an HTML comment start? (a) // (b) /* (c) # (d) <!--
  24. 24.🔗 Which words do you click on?
    <a href="games.html">School news</a>
    (a) games.html (b) Take the quiz (c) href (d) School news
  25. 25.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <h2>Cricket is fun.</h2>
    <p>My best friend</p>
  26. 26.🖼️ Which attribute of <img> describes the picture? (a) height (b) alt (c) width (d) src
  27. 27.True or false: <li> is one item of a list. (a) False (b) True
  28. 28.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Here is my best one. (b) body (c) Easy snacks (d) My Hobbies
  29. 29.🔗 Which address opens when you click this link?
    <a href="contact.html">Maths fun</a>
    (a) maths.html (b) https://example.com (c) contact.html (d) Maths fun
  30. 30.Which of these is an opening tag? (a) <h1> (b) </p> (c) </h1> (d) </body>
  31. 31.True or false: <br> has a closing tag. (a) True (b) False
  32. 32.Which of these is an empty tag? (a) <li> (b) <b> (c) <meta> (d) <p>
  33. 33.🔠 Which heading shows the SMALLEST text: <h5>, <h6>, <h1> or <h2>? (a) <h2> (b) <h6> (c) <h5> (d) <h1>
  34. 34.🔠 Are headings shown in bold by default? (a) Yes (b) No
  35. 35.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Sky is blue<br>Birds sing<br>Roses are red<br>Rivers flow</p>
  36. 36.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <p>Hello, world!</p>
    <p>Good morning!</p>
    <h2>The red kite</h2>
    <p>The red kite</p>
  37. 37.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
    <p>The red kite</p>
    <!-- <p>My pets</p> -->
  38. 38.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="150">
  39. 39.📄 Can HTML on its own make links to pages? (a) No (b) Yes
  40. 40.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <!-- <p>Fun facts</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <p>Our school trip</p>
    <p>I love mangoes.</p>

Answer key

  1. <p>
  2. 3
  3. <h6>
  4. 10
  5. an empty tag
  6. about.html
  7. is where we type code
  8. About us
  9. dog.jpg
  10. <
  11. <li>
  12. the body
  13. a code editor
  14. 3
  15. 5
  16. saves our .html files
  17. <ol>
  18. a closing tag
  19. to leave notes
  20. element
  21. A red kite
  22. 2
  23. <!--
  24. School news
  25. 2
  26. alt
  27. True
  28. Easy snacks
  29. contact.html
  30. <h1>
  31. False
  32. <meta>
  33. <h6>
  34. Yes
  35. 5
  36. 4
  37. 3
  38. 150
  39. Yes
  40. 2

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