← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 104 · 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 attribute of <img> sets how wide it is? (a) src (b) height (c) width (d) alt
  2. 2.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 1 (c) 3 (d) 6
  3. 3.True or false: a code editor shows line numbers. (a) False (b) True
  4. 4.Which of these is true of a web browser? (a) answers page requests (b) is where we type code (c) shows pages from the web (d) saves our .html files
  5. 5.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
  6. 6.True or false: in <img>, src sets how tall it is. (a) True (b) False
  7. 7.🔗 Which tag makes a clickable link? (a) <link> (b) <p> (c) <a> (d) <img>
  8. 8.🔠 How many heading levels does HTML have? (a) 6 (b) 10 (c) 4 (d) 3
  9. 9.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>My pets</p>
    <p>Good morning!</p>
    (a) My pets (b) Cricket is fun. (c) Fun facts (d) Good morning!
  10. 10.True or false: HTML on its own can make headings. (a) False (b) True
  11. 11.True or false: <style> goes in the body. (a) True (b) False
  12. 12.True or false: a web browser turns HTML into a page. (a) True (b) False
  13. 13.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <p>My best friend</p>
    <!-- <p>The red kite</p> -->
    (a) Our school trip (b) My best friend (c) The red kite
  14. 14.🏷️ Every HTML tag starts with which sign? (a) { (b) [ (c) ( (d) <
  15. 15.🔠 Are headings shown in bold by default? (a) Yes (b) No
  16. 16.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Sky is blue<br>Stars shine<br>Birds sing<br>Roses are red</p>
  17. 17.Which of these is true of a web browser? (a) answers page requests (b) turns HTML into a page (c) hosts websites online (d) is where we type code
  18. 18.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h5> or <h6>? (a) <h3> (b) <h6> (c) <h1> (d) <h5>
  19. 19.🔗 Where does this link open?
    <a href="contact.html">Art corner</a>
    (a) in the same tab (b) in a new tab
  20. 20.🔗 Which words do you click on?
    <a href="news.html">Art corner</a>
    (a) href (b) Art corner (c) news.html (d) School news
  21. 21.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <h2>My best friend</h2>
    <p>My best friend</p>
  22. 22.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <!-- <p>My pets</p> -->
    <p>I love mangoes.</p>
    (a) Rain today (b) I love mangoes. (c) My pets
  23. 23.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>Our school trip</p>
    <!-- <p>My pets</p> -->
    (a) The red kite (b) My pets (c) Our school trip
  24. 24.🌐 Which one sends pages over the net? (a) a web browser (b) a web server (c) a code editor
  25. 25.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="300">
  26. 26.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="350">
    (a) map.png (b) Map of India (c) cake.jpg (d) dog.jpg
  27. 27.True or false: in <img>, height names the picture file. (a) False (b) True
  28. 28.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Kites fly high<br>Birds sing</p>
  29. 29.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  30. 30.🔗 Which attribute holds the address of a link? (a) src (b) href (c) alt (d) id
  31. 31.📋 Does this list show bullets or numbers?
    <ul>
      <li>Mango</li>
      <li>Guava</li>
      <li>Litchi</li>
    </ul>
    (a) numbers (b) bullets
  32. 32.True or false: <p> has a closing tag. (a) True (b) False
  33. 33.True or false: in <img>, height sets how tall it is. (a) False (b) True
  34. 34.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <p>The red kite</p>
    <!-- <p>Good morning!</p> -->
    <!-- <p>My best friend</p> -->
    <!-- <p>Hello, world!</p> -->
  35. 35.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
  36. 36.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="350">
  37. 37.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Sky is blue<br>Kites fly high<br>Rivers flow<br>Birds sing</p>
  38. 38.🌐 Which one stores a website’s files? (a) a code editor (b) a web server (c) a web browser
  39. 39.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h2> or <h4>? (a) <h5> (b) <h3> (c) <h4> (d) <h2>
  40. 40.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <!-- <p>Fun facts</p> -->
    <p>Cricket is fun.</p>
    <p>My pets</p>
    (a) Fun facts (b) My pets (c) My best friend (d) Cricket is fun.

Answer key

  1. width
  2. 1
  3. True
  4. shows pages from the web
  5. in the head
  6. False
  7. <a>
  8. 6
  9. Cricket is fun.
  10. True
  11. False
  12. True
  13. The red kite
  14. <
  15. Yes
  16. 5
  17. turns HTML into a page
  18. <h6>
  19. in the same tab
  20. Art corner
  21. 2
  22. My pets
  23. My pets
  24. a web server
  25. 300
  26. map.png
  27. False
  28. 3
  29. has a closing tag
  30. href
  31. bullets
  32. True
  33. True
  34. 2
  35. in the body
  36. 350
  37. 5
  38. a web server
  39. <h2>
  40. Fun facts

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