← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 381 · 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.💬 Why do coders write comments? (a) to leave notes (b) to show pictures (c) to make links (d) to add colour
  2. 2.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>Hello, world!</p>
    <p>My best friend</p>
    <p>Cricket is fun.</p>
    (a) My best friend (b) Hello, world! (c) Rain today (d) Cricket is fun.
  3. 3.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h4>My pets</h4>
    <h4>Good morning!</h4>
  4. 4.True or false: <li> shows 1, 2, 3 numbers. (a) False (b) True
  5. 5.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h3> or <h5>? (a) <h4> (b) <h3> (c) <h5> (d) <h1>
  6. 6.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>Hello, world!</p>
    <p>Hello, world!</p>
    <h2>Cricket is fun.</h2>
  7. 7.🔗 Which address opens when you click this link?
    <a href="maths.html">Contact us</a>
    (a) art.html (b) maths.html (c) Contact us (d) news.html
  8. 8.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h1> or <h6>? (a) <h5> (b) <h6> (c) <h1> (d) <h2>
  9. 9.Which of these is an empty tag? (a) <hr> (b) <h1> (c) <title> (d) <b>
  10. 10.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="100">
  11. 11.🔍 Which is the odd one out? (a) has an address bar (b) turns HTML into a page (c) colours code to help us (d) opens web pages for us
  12. 12.🔍 Which is the odd one out? (a) has an address bar (b) opens web pages for us (c) shows pages from the web (d) is where we type code
  13. 13.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
  14. 14.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h2> or <h6>? (a) <h1> (b) <h6> (c) <h4> (d) <h2>
  15. 15.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h4> or <h2>? (a) <h2> (b) <h1> (c) <h4> (d) <h6>
  16. 16.🖼️ Which attribute of <img> tells which image to load? (a) src (b) alt (c) height (d) width
  17. 17.🔍 One closing tag is missing. Which one?
    <p>Cricket is fun.</p>
    <i>Rain today</i>
    <u>Fun facts
    (a) </p> (b) </i> (c) </h1> (d) </u>
  18. 18.True or false: in <img>, height sets how wide it is. (a) True (b) False
  19. 19.📛 In <a href="x.html">, what is href? (a) an element name (b) a comment (c) a closing tag (d) an attribute
  20. 20.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <title> (c) <style> (d) <ul>
  21. 21.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h3> or <h6>? (a) <h3> (b) <h6> (c) <h5> (d) <h1>
  22. 22.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Kites fly high</p>
  23. 23.📝 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
  24. 24.🔗 Which words do you click on?
    <a href="games.html">About us</a>
    (a) games.html (b) href (c) About us (d) Contact us
  25. 25.🔍 Which is the odd one out? (a) shows line numbers (b) answers page requests (c) is where we type code (d) saves our .html files
  26. 26.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it bold (c) hides the link (d) makes it blank
  27. 27.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <p>Cricket is fun.</p>
    <p>Cricket is fun.</p>
  28. 28.🔢 In a basic web page file, which comes LAST? (a) <!DOCTYPE html> (b) </html> (c) <head> (d) <html>
  29. 29.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>The red kite</p>
    <p>Good morning!</p>
    (a) Good morning! (b) Hello, world! (c) The red kite
  30. 30.📝 What does <p> make? (a) a link (b) a table (c) a picture (d) a paragraph
  31. 31.📋 Does this list show bullets or numbers?
    <ul>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Mango</li>
    </ul>
    (a) numbers (b) bullets
  32. 32.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <p>My best friend</p>
    <!-- <p>The red kite</p> -->
  33. 33.📋 Which list tag shows bullet points? (a) <li> (b) <ol> (c) <ul>
  34. 34.🖼️ Which attribute of <img> names the picture file? (a) alt (b) src (c) height (d) width
  35. 35.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Litchi</li>
    </ol>
  36. 36.🔠 Which tag is the least important heading? (a) <h1> (b) <p> (c) <h3> (d) <h6>
  37. 37.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>Good morning!</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Fun facts</p>
    (a) Fun facts (b) The red kite (c) Good morning! (d) I love mangoes.
  38. 38.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ol> (c) <ul>
  39. 39.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  40. 40.🔍 Which is the odd one out? (a) answers page requests (b) sends pages over the net (c) hosts websites online (d) turns HTML into a page

Answer key

  1. to leave notes
  2. Rain today
  3. 3
  4. False
  5. <h1>
  6. 2
  7. maths.html
  8. <h6>
  9. <hr>
  10. 100
  11. colours code to help us
  12. is where we type code
  13. in the head
  14. <h6>
  15. <h6>
  16. src
  17. </u>
  18. False
  19. an attribute
  20. <ul>
  21. <h6>
  22. 2
  23. as one space
  24. About us
  25. answers page requests
  26. opens it in a new tab
  27. 3
  28. </html>
  29. Hello, world!
  30. a paragraph
  31. bullets
  32. 2
  33. <ul>
  34. src
  35. 2
  36. <h6>
  37. I love mangoes.
  38. <li>
  39. Yes
  40. turns HTML into a page

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