← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 49 · 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.🏷️ Which is the closing tag for <small>? (a) <small> (b) </small> (c) <\small> (d) <small/>
  2. 2.🔍 Which line is missing its closing tag?
    line 1: <u>Good morning!
    line 2: <b>My pets</b>
    line 3: <em>I love mangoes.</em>
    (a) line 3 (b) line 2 (c) line 1
  3. 3.True or false: <ul> goes in the body. (a) False (b) True
  4. 4.🌐 Which one shows line numbers? (a) a web browser (b) a code editor (c) a web server
  5. 5.Which of these is an opening tag? (a) </h1> (b) </li> (c) </title> (d) <li>
  6. 6.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <!-- <p>My pets</p> -->
    <p>Cricket is fun.</p>
    (a) Cricket is fun. (b) My pets (c) Good morning!
  7. 7.🖼️ Which attribute of <img> tells which image to load? (a) height (b) width (c) alt (d) src
  8. 8.🔗 Which address opens when you click this link?
    <a href="about.html">Maths fun</a>
    (a) Maths fun (b) https://example.com (c) about.html (d) contact.html
  9. 9.🔍 One closing tag is missing. Which one?
    <h1>My pets
    <h3>I love mangoes.</h3>
    <i>Rain today</i>
    (a) </h3> (b) </small> (c) </i> (d) </h1>
  10. 10.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Try this poha. (b) My Hobbies (c) Easy snacks (d) body
  11. 11.True or false: HTML on its own cannot make tables. (a) True (b) False
  12. 12.🔠 Which tag is the least important heading? (a) <h1> (b) <h6> (c) <h3> (d) <p>
  13. 13.🖼️ Which tag puts a picture on a page? (a) <a> (b) <img> (c) <pic> (d) <p>
  14. 14.🔗 Which address opens when you click this link?
    <a href="quiz.html">School news</a>
    (a) about.html (b) games.html (c) School news (d) quiz.html
  15. 15.📋 Which list tag is one item of a list? (a) <ol> (b) <li> (c) <ul>
  16. 16.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to make links (d) to add colour
  17. 17.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h1> or <h6>? (a) <h1> (b) <h4> (c) <h6> (d) <h5>
  18. 18.Which of these is true of a code editor? (a) opens web pages for us (b) is where we type code (c) hosts websites online (d) answers page requests
  19. 19.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="50">
    (a) Birthday cake (b) cake.jpg (c) dog.jpg (d) moon.png
  20. 20.📋 Does this list show bullets or numbers?
    <ul>
      <li>Grapes</li>
      <li>Orange</li>
      <li>Guava</li>
    </ul>
    (a) bullets (b) numbers
  21. 21.Which of these is true of a code editor? (a) saves our .html files (b) turns HTML into a page (c) shows pages from the web (d) has an address bar
  22. 22.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  23. 23.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Stars shine<br>Kites fly high<br>Roses are red<br>Sky is blue</p>
  24. 24.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h3> or <h4>? (a) <h6> (b) <h3> (c) <h4> (d) <h1>
  25. 25.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <p>Good morning!</p>
    <!-- <p>Rain today</p> -->
  26. 26.💬 Which text will NOT show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>Fun facts</p>
    <p>My pets</p>
    <p>I love mangoes.</p>
    (a) My pets (b) Cricket is fun. (c) Fun facts (d) I love mangoes.
  27. 27.Which of these is true of a web browser? (a) saves our .html files (b) turns HTML into a page (c) shows line numbers (d) answers page requests
  28. 28.🔗 Which words do you click on?
    <a href="quiz.html">School news</a>
    (a) School news (b) href (c) quiz.html (d) Take the quiz
  29. 29.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <img> (d) <a>
  30. 30.True or false: <h1> goes in the head. (a) False (b) True
  31. 31.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Roses are red</p>
  32. 32.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <p>My best friend</p>
    <p>Our school trip</p>
    <!-- <p>Hello, world!</p> -->
    (a) Hello, world! (b) Our school trip (c) Rain today (d) My best friend
  33. 33.🔍 Which line is missing its closing tag?
    line 1: <strong>My best friend
    line 2: <h3>Cricket is fun.</h3>
    line 3: <h2>My pets</h2>
    (a) line 2 (b) line 3 (c) line 1
  34. 34.True or false: HTML on its own cannot show paragraphs. (a) True (b) False
  35. 35.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <p>Cricket is fun.</p>
    <!-- <p>I love mangoes.</p> -->
  36. 36.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="300">
  37. 37.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <p>My pets</p>
    <p>My pets</p>
  38. 38.🔗 Where does this link open?
    <a href="art.html">Maths fun</a>
    (a) in the same tab (b) in a new tab
  39. 39.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  40. 40.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="350">
    (a) tiger.jpg (b) fort.jpg (c) bus.jpg (d) Our school bus

Answer key

  1. </small>
  2. line 1
  3. True
  4. a code editor
  5. <li>
  6. My pets
  7. src
  8. about.html
  9. </h1>
  10. Easy snacks
  11. False
  12. <h6>
  13. <img>
  14. quiz.html
  15. <li>
  16. to leave notes
  17. <h1>
  18. is where we type code
  19. cake.jpg
  20. bullets
  21. saves our .html files
  22. Yes
  23. 5
  24. <h6>
  25. 2
  26. Cricket is fun.
  27. turns HTML into a page
  28. School news
  29. <a>
  30. False
  31. 2
  32. Hello, world!
  33. line 1
  34. False
  35. 2
  36. 300
  37. 3
  38. in the same tab
  39. Yes
  40. bus.jpg

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