← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 218 · 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.🔍 One closing tag is missing. Which one?
    <i>Rain today
    <h2>Cricket is fun.</h2>
    <small>My pets</small>
    (a) </h1> (b) </h2> (c) </i> (d) </small>
  2. 2.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  3. 3.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  4. 4.🔗 Which attribute holds the address of a link? (a) alt (b) src (c) id (d) href
  5. 5.True or false: a web browser sends pages over the net. (a) False (b) True
  6. 6.True or false: HTML on its own can make a form. (a) False (b) True
  7. 7.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="200">
  8. 8.📄 What is the first line of an HTML5 page? (a) <head> (b) <html> (c) <!DOCTYPE html> (d) <body>
  9. 9.True or false: <input> has a closing tag. (a) False (b) True
  10. 10.🔍 One closing tag is missing. Which one?
    <strong>I love mangoes.
    <h2>Fun facts</h2>
    <p>The red kite</p>
    (a) </p> (b) </small> (c) </h2> (d) </strong>
  11. 11.📄 Where does the text of <title> appear? (a) in a big heading (b) at the bottom (c) on the browser tab (d) nowhere
  12. 12.🌐 Which one saves our .html files? (a) a web browser (b) a web server (c) a code editor
  13. 13.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>I love mangoes.</p>
    <h2>My best friend</h2>
    <h2>Fun facts</h2>
    <p>Hello, world!</p>
  14. 14.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h3> or <h4>? (a) <h3> (b) <h2> (c) <h4> (d) <h1>
  15. 15.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as a dot (c) as a new line (d) as 5 spaces
  16. 16.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 3 (c) 10 (d) 1
  17. 17.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="350">
    (a) width (b) A tiger asleep (c) An old fort (d) fort.jpg
  18. 18.🔗 Which address opens when you click this link?
    <a href="games.html">About us</a>
    (a) contact.html (b) about.html (c) games.html (d) About us
  19. 19.True or false: HTML on its own cannot add up two numbers. (a) False (b) True
  20. 20.Which of these is true of a code editor? (a) turns HTML into a page (b) shows pages from the web (c) has an address bar (d) colours code to help us
  21. 21.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  22. 22.Which of these has a closing tag? (a) <meta> (b) <img> (c) <title> (d) <input>
  23. 23.True or false: <ul> lists things in any order. (a) False (b) True
  24. 24.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <p>Hello, world!</p>
    <p>My best friend</p>
    <h2>Fun facts</h2>
    <h2>Rain today</h2>
    <p>Cricket is fun.</p>
  25. 25.Which of these goes in the head? (a) <table> (b) <ul> (c) <img> (d) <style>
  26. 26.🔗 Where does this link open?
    <a href="about.html">School news</a>
    (a) in a new tab (b) in the same tab
  27. 27.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Rain today</p> -->
    <p>Our school trip</p>
  28. 28.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <!-- <p>Fun facts</p> -->
    <!-- <p>Good morning!</p> -->
  29. 29.🔗 Where does this link open?
    <a href="news.html" target="_blank">Take the quiz</a>
    (a) in the same tab (b) in a new tab
  30. 30.📋 Which list tag shows bullet points? (a) <ol> (b) <li> (c) <ul>
  31. 31.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Try this poha. (b) Welcome! (c) index.html (d) Class 7 Blog
  32. 32.📋 Which list tag is one item of a list? (a) <ol> (b) <li> (c) <ul>
  33. 33.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h3> or <h5>? (a) <h1> (b) <h4> (c) <h5> (d) <h3>
  34. 34.🔗 Which words do you click on?
    <a href="about.html">School news</a>
    (a) School news (b) about.html (c) Take the quiz (d) href
  35. 35.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>Good morning!</p>
    <p>Hello, world!</p>
  36. 36.📋 Which list shows the steps of a recipe best? (a) <br> (b) <hr> (c) <ol> (d) <ul>
  37. 37.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  38. 38.📋 Does this list show bullets or numbers?
    <ol>
      <li>Mango</li>
      <li>Banana</li>
      <li>Guava</li>
    </ol>
    (a) numbers (b) bullets
  39. 39.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <h2>Rain today</h2>
    <p>Hello, world!</p>
  40. 40.Which of these is an opening tag? (a) </p> (b) </b> (c) <p> (d) </title>

Answer key

  1. </i>
  2. has a closing tag
  3. Yes
  4. href
  5. False
  6. True
  7. 200
  8. <!DOCTYPE html>
  9. False
  10. </strong>
  11. on the browser tab
  12. a code editor
  13. 3
  14. <h1>
  15. as one space
  16. 1
  17. An old fort
  18. games.html
  19. True
  20. colours code to help us
  21. has a closing tag
  22. <title>
  23. True
  24. 4
  25. <style>
  26. in the same tab
  27. 1
  28. 1
  29. in a new tab
  30. <ul>
  31. Class 7 Blog
  32. <li>
  33. <h5>
  34. School news
  35. 2
  36. <ol>
  37. No
  38. numbers
  39. 2
  40. <p>

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