← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 943 · 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.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
    <p>The red kite</p>
  2. 2.📋 Which list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <br> (d) <ul>
  3. 3.📄 Can HTML on its own pick a random number? (a) Yes (b) No
  4. 4.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a href="about.html"> (d) <a src="about.html">
  5. 5.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  6. 6.📋 Which tag goes around each item of a list? (a) <li> (b) <p> (c) <ul> (d) <ol>
  7. 7.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) index.html (b) Art Gallery (c) Welcome! (d) Mars is red.
  8. 8.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <!-- <p>Rain today</p> -->
    <p>My best friend</p>
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>Hello, world!</p> -->
  9. 9.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="150">
    (a) bus.jpg (b) The full moon (c) fort.jpg (d) moon.png
  10. 10.🔍 Which is the odd one out? (a) saves our .html files (b) is where we type code (c) shows pages from the web (d) colours code to help us
  11. 11.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
  12. 12.📋 Which list shows the steps of a recipe best? (a) <br> (b) <hr> (c) <ol> (d) <ul>
  13. 13.🔗 Which tag makes a clickable link? (a) <a> (b) <p> (c) <img> (d) <link>
  14. 14.📄 Which part holds everything you see on the page? (a) the body (b) the head (c) the title (d) the doctype
  15. 15.🔗 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
  16. 16.📄 Where does the text of <title> appear? (a) nowhere (b) on the browser tab (c) at the bottom (d) in a big heading
  17. 17.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ul> (c) <ol>
  18. 18.🔗 Which address opens when you click this link?
    <a href="about.html">Art corner</a>
    (a) https://example.com (b) Art corner (c) contact.html (d) about.html
  19. 19.True or false: <title> goes in the body. (a) True (b) False
  20. 20.🌐 Which one has an address bar? (a) a code editor (b) a web server (c) a web browser
  21. 21.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) address (c) element (d) attribute
  22. 22.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  23. 23.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <p>Our school trip</p>
    <!-- <p>The red kite</p> -->
  24. 24.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="350">
    (a) tiger.jpg (b) A red kite (c) A tiger asleep (d) width
  25. 25.Which of these is an opening tag? (a) </body> (b) <b> (c) </title> (d) </p>
  26. 26.True or false: <ol> goes inside ul or ol. (a) False (b) True
  27. 27.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h4>Our school trip</h4>
    <h4>Hello, world!</h4>
    <p>My best friend</p>
  28. 28.📋 How many items does this list show?
    <ol>
      <li>Papaya</li>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Grapes</li>
    </ol>
  29. 29.True or false: <link rel="stylesheet"> goes in the head. (a) False (b) True
  30. 30.True or false: <img> is an empty tag. (a) False (b) True
  31. 31.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h6> or <h3>? (a) <h4> (b) <h6> (c) <h3> (d) <h2>
  32. 32.🔍 Which line is missing its closing tag?
    line 1: <h3>Fun facts</h3>
    line 2: <p>My pets</p>
    line 3: <b>Our school trip
    (a) line 3 (b) line 1 (c) line 2
  33. 33.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h5> or <h1>? (a) <h5> (b) <h3> (c) <h1> (d) <h6>
  34. 34.🏷️ Which is the closing tag for <u>? (a) <\u> (b) </u> (c) <u/> (d) <u>
  35. 35.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a dot . (c) a slash / (d) a hash #
  36. 36.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="150">
    (a) A happy dog (b) bus.jpg (c) moon.png (d) dog.jpg
  37. 37.🧱 HTML gives a web page its ___. (a) speed (b) sound (c) colours (d) structure
  38. 38.True or false: <ul> shows 1, 2, 3 numbers. (a) True (b) False
  39. 39.🔍 One closing tag is missing. Which one?
    <h3>Cricket is fun.</h3>
    <em>My best friend
    <small>My pets</small>
    (a) </h3> (b) </small> (c) </h2> (d) </em>
  40. 40.🏷️ HTML marks up text using ___. (a) pixels (b) wires (c) tags (d) keys

Answer key

  1. 3
  2. <ul>
  3. No
  4. <a href="about.html">
  5. has a closing tag
  6. <li>
  7. Art Gallery
  8. 2
  9. moon.png
  10. shows pages from the web
  11. Yes
  12. <ol>
  13. <a>
  14. the body
  15. opens it in a new tab
  16. on the browser tab
  17. <ol>
  18. about.html
  19. False
  20. a web browser
  21. element
  22. a closing tag
  23. 2
  24. A tiger asleep
  25. <b>
  26. False
  27. 3
  28. 5
  29. True
  30. True
  31. <h6>
  32. line 3
  33. <h1>
  34. </u>
  35. a slash /
  36. dog.jpg
  37. structure
  38. False
  39. </em>
  40. tags

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