← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 705 · 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.📝 What does <p> make? (a) a paragraph (b) a link (c) a picture (d) a table
  2. 2.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  3. 3.📋 Which list tag goes inside ul or ol? (a) <ul> (b) <li> (c) <ol>
  4. 4.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Good morning!</p> -->
    <p>Hello, world!</p>
    <p>Fun facts</p>
    (a) Fun facts (b) Good morning! (c) Hello, world! (d) I love mangoes.
  5. 5.📋 Does this list show bullets or numbers?
    <ol>
      <li>Guava</li>
      <li>Mango</li>
    </ol>
    (a) bullets (b) numbers
  6. 6.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a src="about.html"> (d) <a href="about.html">
  7. 7.True or false: <img> goes in the head. (a) True (b) False
  8. 8.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  9. 9.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  10. 10.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h3> or <h2>? (a) <h6> (b) <h5> (c) <h2> (d) <h3>
  11. 11.📄 Which part holds everything you see on the page? (a) the head (b) the body (c) the title (d) the doctype
  12. 12.True or false: <link rel="stylesheet"> goes in the body. (a) False (b) True
  13. 13.🖼️ Which tag puts a picture on a page? (a) <img> (b) <p> (c) <a> (d) <pic>
  14. 14.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  15. 15.📋 What number does the browser show next to “Mango”?
    <ol start="6">
      <li>Banana</li>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Grapes</li>
      <li>Orange</li>
      <li>Papaya</li>
    </ol>
  16. 16.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
  17. 17.📝 What does <br> do? (a) makes text bold (b) adds a picture (c) makes a list (d) starts a new line
  18. 18.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) alt (c) src (d) width
  19. 19.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>Fun facts</p>
    <p>My best friend</p>
    <p>Rain today</p>
  20. 20.📄 Can HTML on its own count button clicks? (a) Yes (b) No
  21. 21.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h6> (c) <h1> (d) <br>
  22. 22.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <p>I love mangoes.</p>
    <p>My pets</p>
  23. 23.True or false: a web server shows line numbers. (a) True (b) False
  24. 24.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>Rain today</p>
    <p>I love mangoes.</p>
    <p>The red kite</p>
    <p>My best friend</p>
  25. 25.True or false: <title> has a closing tag. (a) True (b) False
  26. 26.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <p>Rain today</p>
    <p>Hello, world!</p>
    <!-- <p>I love mangoes.</p> -->
  27. 27.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h6> or <h4>? (a) <h5> (b) <h4> (c) <h1> (d) <h6>
  28. 28.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <h2>I love mangoes.</h2>
    <p>I love mangoes.</p>
    <p>Good morning!</p>
  29. 29.Which of these is an opening tag? (a) </p> (b) </li> (c) </title> (d) <p>
  30. 30.True or false: <a> goes in the head. (a) False (b) True
  31. 31.True or false: <br> is an empty tag. (a) True (b) False
  32. 32.True or false: a web server opens web pages for us. (a) False (b) True
  33. 33.🔗 Where does this link open?
    <a href="about.html" target="_blank">About us</a>
    (a) in the same tab (b) in a new tab
  34. 34.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h4>My best friend</h4>
    <p>Our school trip</p>
  35. 35.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
    <p>Our school trip</p>
  36. 36.🏷️ Which is the closing tag for <small>? (a) <small> (b) <small/> (c) <\small> (d) </small>
  37. 37.True or false: <b> is an empty tag. (a) True (b) False
  38. 38.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>Hello, world!</p>
    <p>The red kite</p>
    <p>Rain today</p>
    <p>The red kite</p>
  39. 39.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="250">
  40. 40.💬 How does an HTML comment start? (a) <!-- (b) // (c) # (d) /*

Answer key

  1. a paragraph
  2. has a closing tag
  3. <li>
  4. Good morning!
  5. numbers
  6. <a href="about.html">
  7. False
  8. an opening tag
  9. a closing tag
  10. <h2>
  11. the body
  12. False
  13. <img>
  14. a closing tag
  15. 8
  16. in the body
  17. starts a new line
  18. alt
  19. 1
  20. No
  21. <h1>
  22. 2
  23. False
  24. 5
  25. True
  26. 3
  27. <h6>
  28. 3
  29. <p>
  30. False
  31. True
  32. False
  33. in a new tab
  34. 2
  35. 3
  36. </small>
  37. False
  38. 1
  39. 250
  40. <!--

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