← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 24 · 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.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="300">
    (a) kite.png (b) A red kite (c) Map of India (d) width
  2. 2.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
  3. 3.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
  4. 4.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) attribute (c) address (d) editor
  5. 5.🔗 Which tag makes a clickable link? (a) <link> (b) <p> (c) <a> (d) <img>
  6. 6.📋 What number does the browser show next to “Papaya”?
    <ol>
      <li>Litchi</li>
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Banana</li>
    </ol>
  7. 7.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a new line (c) as a dot (d) as one space
  8. 8.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  9. 9.True or false: <table> goes in the head. (a) True (b) False
  10. 10.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) alt (c) src (d) width
  11. 11.🔍 Which line is missing its closing tag?
    line 1: <strong>Our school trip</strong>
    line 2: <i>Fun facts</i>
    line 3: <u>Cricket is fun.
    (a) line 3 (b) line 2 (c) line 1
  12. 12.🔗 Which address opens when you click this link?
    <a href="news.html">Visit the site</a>
    (a) Visit the site (b) games.html (c) news.html (d) quiz.html
  13. 13.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
  14. 14.🔍 Which line is missing its closing tag?
    line 1: <h3>Cricket is fun.</h3>
    line 2: <h1>I love mangoes.</h1>
    line 3: <i>Our school trip
    (a) line 1 (b) line 2 (c) line 3
  15. 15.🔠 Which tag is the least important heading? (a) <h6> (b) <h1> (c) <h3> (d) <p>
  16. 16.📋 How many items does this list show?
    <ul>
      <li>Orange</li>
      <li>Papaya</li>
      <li>Mango</li>
    </ul>
  17. 17.Which of these is an empty tag? (a) <li> (b) <p> (c) <title> (d) <meta>
  18. 18.🏷️ Every HTML tag starts with which sign? (a) ( (b) < (c) [ (d) {
  19. 19.🌐 Which one hosts websites online? (a) a web browser (b) a web server (c) a code editor
  20. 20.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="200">
    (a) width (b) tiger.jpg (c) A tiger asleep (d) A red kite
  21. 21.Which of these is true of a web browser? (a) is where we type code (b) opens web pages for us (c) saves our .html files (d) hosts websites online
  22. 22.🔗 Which address opens when you click this link?
    <a href="art.html">Maths fun</a>
    (a) quiz.html (b) Maths fun (c) art.html (d) news.html
  23. 23.True or false: <ul> shows bullet points. (a) False (b) True
  24. 24.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  25. 25.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) <head> (c) </html> (d) </head>
  26. 26.🔍 One closing tag is missing. Which one?
    <h3>Our school trip</h3>
    <u>My pets</u>
    <strong>Fun facts
    (a) </strong> (b) </h3> (c) </u> (d) </em>
  27. 27.🔗 Which attribute holds the address of a link? (a) id (b) src (c) href (d) alt
  28. 28.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <p>The red kite</p>
    <p>My best friend</p>
    <p>My pets</p>
    <!-- <p>Our school trip</p> -->
  29. 29.📄 Can HTML on its own count button clicks? (a) No (b) Yes
  30. 30.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  31. 31.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Mango</li>
    </ul>
    (a) numbers (b) bullets
  32. 32.🏷️ HTML marks up text using ___. (a) tags (b) wires (c) keys (d) pixels
  33. 33.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h1> or <h5>? (a) <h3> (b) <h5> (c) <h6> (d) <h1>
  34. 34.True or false: in <img>, width names the picture file. (a) False (b) True
  35. 35.True or false: HTML on its own cannot make tables. (a) False (b) True
  36. 36.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h2> or <h5>? (a) <h6> (b) <h2> (c) <h5> (d) <h1>
  37. 37.🔠 Are headings shown in bold by default? (a) No (b) Yes
  38. 38.📋 Which list tag is an unordered list? (a) <ol> (b) <li> (c) <ul>
  39. 39.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Hello, world!</p>
    (a) I love mangoes. (b) Fun facts (c) Hello, world!
  40. 40.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag

Answer key

  1. A red kite
  2. in the body
  3. in the body
  4. element
  5. <a>
  6. 2
  7. as one space
  8. has a closing tag
  9. False
  10. alt
  11. line 3
  12. news.html
  13. No
  14. line 3
  15. <h6>
  16. 3
  17. <meta>
  18. <
  19. a web server
  20. A tiger asleep
  21. opens web pages for us
  22. art.html
  23. True
  24. Yes
  25. <!DOCTYPE html>
  26. </strong>
  27. href
  28. 4
  29. No
  30. a closing tag
  31. bullets
  32. tags
  33. <h6>
  34. False
  35. False
  36. <h1>
  37. Yes
  38. <ul>
  39. I love mangoes.
  40. a closing tag

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