← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 603 · 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 <hr> draw? (a) a table (b) a picture (c) a link (d) a line across the page
  2. 2.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>My pets</p>
    <h2>Rain today</h2>
    <p>My pets</p>
    <p>My pets</p>
  3. 3.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Birds sing<br>Roses are red<br>Sky is blue</p>
  4. 4.True or false: <hr> is an empty tag. (a) True (b) False
  5. 5.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h3> or <h6>? (a) <h6> (b) <h3> (c) <h4> (d) <h2>
  6. 6.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>Good morning!</p>
    <p>I love mangoes.</p>
    (a) I love mangoes. (b) Rain today (c) Good morning!
  7. 7.🔗 Where does this link open?
    <a href="about.html">School news</a>
    (a) in the same tab (b) in a new tab
  8. 8.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h6> or <h1>? (a) <h5> (b) <h1> (c) <h4> (d) <h6>
  9. 9.🌐 Which one answers page requests? (a) a web browser (b) a code editor (c) a web server
  10. 10.True or false: <a> goes in the head. (a) True (b) False
  11. 11.True or false: HTML on its own cannot count button clicks. (a) False (b) True
  12. 12.💬 How does an HTML comment start? (a) <!-- (b) // (c) # (d) /*
  13. 13.🔍 Which line is missing its closing tag?
    line 1: <i>Hello, world!</i>
    line 2: <em>Rain today
    line 3: <p>My best friend</p>
    (a) line 2 (b) line 3 (c) line 1
  14. 14.📋 Which tag goes around each item of a list? (a) <ul> (b) <ol> (c) <li> (d) <p>
  15. 15.📋 Does this list show bullets or numbers?
    <ul>
      <li>Papaya</li>
      <li>Orange</li>
      <li>Jamun</li>
    </ul>
    (a) numbers (b) bullets
  16. 16.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="400">
  17. 17.🏷️ Every HTML tag starts with which sign? (a) ( (b) [ (c) < (d) {
  18. 18.📄 Can HTML on its own show paragraphs? (a) No (b) Yes
  19. 19.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="200">
    (a) Map of India (b) kite.png (c) A red kite (d) width
  20. 20.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <p> (d) <a>
  21. 21.🔠 How many heading levels does HTML have? (a) 4 (b) 6 (c) 3 (d) 10
  22. 22.True or false: a web server shows pages from the web. (a) True (b) False
  23. 23.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
  24. 24.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="150">
  25. 25.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <!-- <p>Fun facts</p> -->
    <p>I love mangoes.</p>
    <p>My pets</p>
    (a) Fun facts (b) I love mangoes. (c) My pets (d) The red kite
  26. 26.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="350">
  27. 27.💬 Does the browser show comments on the page? (a) No (b) Yes
  28. 28.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
  29. 29.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <img> (d) <a>
  30. 30.True or false: <li> lists things in any order. (a) False (b) True
  31. 31.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h4>Good morning!</h4>
    <p>My best friend</p>
    <p>I love mangoes.</p>
    <h4>Fun facts</h4>
  32. 32.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Litchi</li>
      <li>Orange</li>
      <li>Banana</li>
    </ol>
  33. 33.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <!-- <p>Fun facts</p> -->
    <p>Cricket is fun.</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Our school trip</p>
  34. 34.📋 Does this list show bullets or numbers?
    <ul>
      <li>Orange</li>
      <li>Litchi</li>
    </ul>
    (a) numbers (b) bullets
  35. 35.True or false: in <img>, src tells which image to load. (a) True (b) False
  36. 36.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="50">
  37. 37.🔗 Which attribute holds the address of a link? (a) id (b) src (c) href (d) alt
  38. 38.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <!-- <p>Hello, world!</p> -->
    <p>I love mangoes.</p>
    <!-- <p>Fun facts</p> -->
  39. 39.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  40. 40.🌐 Which one opens web pages for us? (a) a web server (b) a code editor (c) a web browser

Answer key

  1. a line across the page
  2. 4
  3. 4
  4. True
  5. <h2>
  6. Rain today
  7. in the same tab
  8. <h1>
  9. a web server
  10. False
  11. True
  12. <!--
  13. line 2
  14. <li>
  15. bullets
  16. 400
  17. <
  18. Yes
  19. A red kite
  20. <a>
  21. 6
  22. False
  23. in the head
  24. 150
  25. Fun facts
  26. 350
  27. No
  28. in the head
  29. <img>
  30. False
  31. 3
  32. 4
  33. 3
  34. bullets
  35. True
  36. 50
  37. href
  38. 1
  39. an opening tag
  40. a web browser

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