← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 224 · 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.🔤 In “HTML”, what do the letters HT stand for? (a) Hot Tags (b) High Tech (c) Home Text (d) HyperText
  2. 2.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="300">
    (a) cake.jpg (b) dog.jpg (c) map.png (d) Map of India
  3. 3.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <html> (d) <head>
  4. 4.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  5. 5.🔗 Which words do you click on?
    <a href="news.html">School news</a>
    (a) news.html (b) href (c) Take the quiz (d) School news
  6. 6.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <!-- <p>My pets</p> -->
    <p>Hello, world!</p>
    <p>My best friend</p>
  7. 7.True or false: a web browser colours code to help us. (a) True (b) False
  8. 8.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  9. 9.True or false: <ol> shows bullet points. (a) True (b) False
  10. 10.💬 How does an HTML comment start? (a) # (b) /* (c) <!-- (d) //
  11. 11.Which of these goes in the head? (a) <ul> (b) <h1> (c) <p> (d) <title>
  12. 12.🔗 Where does this link open?
    <a href="art.html">Take the quiz</a>
    (a) in a new tab (b) in the same tab
  13. 13.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <table> (c) <title> (d) <link rel="stylesheet">
  14. 14.🖼️ Which attribute of <img> describes the picture? (a) src (b) height (c) width (d) alt
  15. 15.🖼️ Which attribute of <img> tells which image to load? (a) src (b) alt (c) height (d) width
  16. 16.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) My drawings (b) My Hobbies (c) index.html (d) I like to read.
  17. 17.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  18. 18.📋 How many items does this list show?
    <ol>
      <li>Guava</li>
      <li>Banana</li>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Jamun</li>
    </ol>
  19. 19.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="100">
    (a) tiger.jpg (b) kite.png (c) An old fort (d) fort.jpg
  20. 20.Which of these goes in the head? (a) <h1> (b) <style> (c) <table> (d) <a>
  21. 21.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 3 (c) 10 (d) 1
  22. 22.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  23. 23.True or false: in <img>, src describes the picture. (a) True (b) False
  24. 24.🔍 Which line is missing its closing tag?
    line 1: <h3>Our school trip</h3>
    line 2: <i>Cricket is fun.</i>
    line 3: <u>Good morning!
    (a) line 1 (b) line 2 (c) line 3
  25. 25.🏷️ Which is the closing tag for <h3>? (a) <\h3> (b) <h3> (c) </h3> (d) <h3/>
  26. 26.💬 How does an HTML comment end? (a) */ (b) // (c) >> (d) -->
  27. 27.📋 What number does the browser show next to “Papaya”?
    <ol>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Papaya</li>
    </ol>
  28. 28.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  29. 29.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) address (c) element (d) editor
  30. 30.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a href="about.html"> (c) <a src="about.html"> (d) <link about.html>
  31. 31.🖼️ Which attribute of <img> shows if the image fails? (a) alt (b) height (c) width (d) src
  32. 32.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  33. 33.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  34. 34.💬 Which text will NOT show on the page?
    <!-- <p>Good morning!</p> -->
    <p>Cricket is fun.</p>
    <p>Hello, world!</p>
    <p>Rain today</p>
    (a) Hello, world! (b) Cricket is fun. (c) Good morning! (d) Rain today
  35. 35.🔢 In a basic web page file, which comes first: “<head>” or “<body>”? (a) <head> (b) <body>
  36. 36.True or false: a code editor opens web pages for us. (a) True (b) False
  37. 37.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h4> or <h5>? (a) <h4> (b) <h2> (c) <h1> (d) <h5>
  38. 38.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Roses are red<br>Rivers flow</p>
  39. 39.🏷️ Which is the closing tag for <b>? (a) </b> (b) <b> (c) <b/> (d) <\b>
  40. 40.📋 Which list tag lists things in any order? (a) <ol> (b) <ul> (c) <li>

Answer key

  1. HyperText
  2. map.png
  3. <!DOCTYPE html>
  4. has a closing tag
  5. School news
  6. 2
  7. False
  8. Yes
  9. False
  10. <!--
  11. <title>
  12. in the same tab
  13. <table>
  14. alt
  15. src
  16. My Hobbies
  17. has a closing tag
  18. 5
  19. fort.jpg
  20. <style>
  21. 1
  22. a closing tag
  23. False
  24. line 3
  25. </h3>
  26. -->
  27. 6
  28. an opening tag
  29. element
  30. <a href="about.html">
  31. alt
  32. an opening tag
  33. a closing tag
  34. Good morning!
  35. <head>
  36. False
  37. <h1>
  38. 3
  39. </b>
  40. <ul>

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