← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 837 · 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 <a href="x.html">, what is href? (a) a closing tag (b) an attribute (c) a comment (d) an element name
  2. 2.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a slash / (c) a hash # (d) a dollar $
  3. 3.🏷️ Which is the closing tag for <h3>? (a) <h3/> (b) <\h3> (c) </h3> (d) <h3>
  4. 4.📄 Can HTML on its own count button clicks? (a) No (b) Yes
  5. 5.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Kites fly high</p>
  6. 6.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <hr> (d) <ol>
  7. 7.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  8. 8.🌐 Which one has an address bar? (a) a web browser (b) a web server (c) a code editor
  9. 9.💾 A web page file usually ends with which extension? (a) .txt (b) .png (c) .mp3 (d) .html
  10. 10.True or false: <input> is an empty tag. (a) False (b) True
  11. 11.🔠 How many heading levels does HTML have? (a) 4 (b) 10 (c) 3 (d) 6
  12. 12.📝 What does <br> do? (a) adds a picture (b) makes text bold (c) starts a new line (d) makes a list
  13. 13.📋 What number does the browser show next to “Banana”?
    <ol>
      <li>Grapes</li>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Banana</li>
      <li>Litchi</li>
    </ol>
  14. 14.📋 Does this list show bullets or numbers?
    <ul>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Jamun</li>
    </ul>
    (a) bullets (b) numbers
  15. 15.📋 How many items does this list show?
    <ol>
      <li>Banana</li>
      <li>Papaya</li>
    </ol>
  16. 16.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>Fun facts</p>
    <h2>Hello, world!</h2>
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
  17. 17.💬 How does an HTML comment start? (a) // (b) <!-- (c) # (d) /*
  18. 18.📄 Which part holds everything you see on the page? (a) the head (b) the body (c) the title (d) the doctype
  19. 19.📋 What number does the browser show next to “Papaya”?
    <ol start="8">
      <li>Banana</li>
      <li>Orange</li>
      <li>Papaya</li>
      <li>Grapes</li>
      <li>Guava</li>
    </ol>
  20. 20.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="100">
    (a) map.png (b) Map of India (c) Birthday cake (d) width
  21. 21.🖼️ Which tag puts a picture on a page? (a) <img> (b) <a> (c) <pic> (d) <p>
  22. 22.📋 Which list tag lists steps in order? (a) <ul> (b) <li> (c) <ol>
  23. 23.🔗 Where does this link open?
    <a href="contact.html" target="_blank">Art corner</a>
    (a) in a new tab (b) in the same tab
  24. 24.🔍 Which is the odd one out? (a) has an address bar (b) stores a website’s files (c) hosts websites online (d) answers page requests
  25. 25.🔠 Which heading shows the SMALLEST text: <h5>, <h6>, <h1> or <h4>? (a) <h4> (b) <h6> (c) <h1> (d) <h5>
  26. 26.True or false: HTML on its own can pick a random number. (a) False (b) True
  27. 27.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <!-- <p>My pets</p> -->
    <!-- <p>My best friend</p> -->
    <p>Hello, world!</p>
  28. 28.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) width (c) alt (d) height
  29. 29.🔍 Which line is missing its closing tag?
    line 1: <i>Cricket is fun.</i>
    line 2: <h1>Hello, world!
    line 3: <b>My pets</b>
    (a) line 2 (b) line 1 (c) line 3
  30. 30.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  31. 31.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) makes it bold (d) opens it in a new tab
  32. 32.True or false: <a> goes in the body. (a) False (b) True
  33. 33.🌐 Which one shows pages from the web? (a) a code editor (b) a web browser (c) a web server
  34. 34.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as one space (c) as a dot (d) as a new line
  35. 35.🔗 Which words do you click on?
    <a href="contact.html">Take the quiz</a>
    (a) contact.html (b) Take the quiz (c) Play games (d) href
  36. 36.True or false: a web server shows pages from the web. (a) True (b) False
  37. 37.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h3> or <h1>? (a) <h1> (b) <h5> (c) <h3> (d) <h4>
  38. 38.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h3> or <h4>? (a) <h4> (b) <h3> (c) <h1> (d) <h5>
  39. 39.🔍 One closing tag is missing. Which one?
    <h1>My best friend</h1>
    <h2>Rain today
    <u>Hello, world!</u>
    (a) </h2> (b) </u> (c) </h1> (d) </strong>
  40. 40.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <p>My pets</p>
    <p>Our school trip</p>
    <h2>I love mangoes.</h2>

Answer key

  1. an attribute
  2. a slash /
  3. </h3>
  4. No
  5. 2
  6. <ol>
  7. No
  8. a web browser
  9. .html
  10. True
  11. 6
  12. starts a new line
  13. 5
  14. bullets
  15. 2
  16. 4
  17. <!--
  18. the body
  19. 10
  20. Map of India
  21. <img>
  22. <ol>
  23. in a new tab
  24. has an address bar
  25. <h6>
  26. False
  27. 1
  28. alt
  29. line 2
  30. a closing tag
  31. opens it in a new tab
  32. True
  33. a web browser
  34. as one space
  35. Take the quiz
  36. False
  37. <h1>
  38. <h5>
  39. </h2>
  40. 3

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