← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 179 · 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.True or false: <hr> has a closing tag. (a) False (b) True
  2. 2.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="150">
  3. 3.🌐 Which one colours code to help us? (a) a web server (b) a code editor (c) a web browser
  4. 4.True or false: <ul> is an unordered list. (a) True (b) False
  5. 5.🔗 Which tag makes a clickable link? (a) <p> (b) <a> (c) <link> (d) <img>
  6. 6.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="150">
  7. 7.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 10 (c) 3 (d) 1
  8. 8.📋 Which list tag is one item of a list? (a) <ol> (b) <ul> (c) <li>
  9. 9.💬 How does an HTML comment end? (a) */ (b) // (c) >> (d) -->
  10. 10.True or false: HTML on its own can pick a random number. (a) False (b) True
  11. 11.📋 Does this list show bullets or numbers?
    <ol>
      <li>Grapes</li>
      <li>Guava</li>
      <li>Mango</li>
    </ol>
    (a) numbers (b) bullets
  12. 12.Which of these is true of a web browser? (a) is where we type code (b) sends pages over the net (c) answers page requests (d) opens web pages for us
  13. 13.💬 How does an HTML comment start? (a) # (b) /* (c) // (d) <!--
  14. 14.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  15. 15.📋 What number does the browser show next to “Grapes”?
    <ol>
      <li>Papaya</li>
      <li>Orange</li>
      <li>Grapes</li>
    </ol>
  16. 16.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h3> or <h2>? (a) <h1> (b) <h5> (c) <h3> (d) <h2>
  17. 17.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) We won by 5 runs. (b) Space Facts (c) My drawings (d) index.html
  18. 18.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a alt="about.html"> (c) <a href="about.html"> (d) <link about.html>
  19. 19.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
  20. 20.True or false: <p> goes in the head. (a) False (b) True
  21. 21.True or false: <br> has a closing tag. (a) False (b) True
  22. 22.📋 What number does the browser show next to “Mango”?
    <ol start="4">
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Mango</li>
    </ol>
  23. 23.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>My best friend</p>
    <h3>Hello, world!</h3>
  24. 24.🔢 In a basic web page file, which comes first: “<body>” or “<head>”? (a) <body> (b) <head>
  25. 25.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <p>Fun facts</p>
    <p>Rain today</p>
    <!-- <p>My best friend</p> -->
  26. 26.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <p>Rain today</p>
    <!-- <p>My pets</p> -->
  27. 27.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="300">
    (a) Map of India (b) width (c) map.png (d) Birthday cake
  28. 28.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="250">
  29. 29.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it blank (d) makes it bold
  30. 30.📝 What does <p> make? (a) a paragraph (b) a link (c) a table (d) a picture
  31. 31.Which of these is true of a web server? (a) has an address bar (b) answers page requests (c) turns HTML into a page (d) is where we type code
  32. 32.🌐 Which one sends pages over the net? (a) a web browser (b) a code editor (c) a web server
  33. 33.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="350">
    (a) A tiger asleep (b) width (c) tiger.jpg (d) A red kite
  34. 34.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) width (c) src (d) alt
  35. 35.🔍 Which line is missing its closing tag?
    line 1: <p>Rain today</p>
    line 2: <u>I love mangoes.
    line 3: <h3>My pets</h3>
    (a) line 2 (b) line 1 (c) line 3
  36. 36.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Sky is blue<br>Roses are red<br>Stars shine</p>
  37. 37.🌐 Which one turns HTML into a page? (a) a web server (b) a code editor (c) a web browser
  38. 38.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>I love mangoes.</p>
    <h4>Cricket is fun.</h4>
    <h4>I love mangoes.</h4>
  39. 39.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) src (d) href
  40. 40.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h2> or <h1>? (a) <h3> (b) <h2> (c) <h6> (d) <h1>

Answer key

  1. False
  2. 150
  3. a code editor
  4. True
  5. <a>
  6. 150
  7. 1
  8. <li>
  9. -->
  10. False
  11. numbers
  12. opens web pages for us
  13. <!--
  14. Yes
  15. 3
  16. <h5>
  17. Space Facts
  18. <a href="about.html">
  19. in the head
  20. False
  21. False
  22. 6
  23. 2
  24. <head>
  25. 3
  26. 2
  27. Map of India
  28. 250
  29. opens it in a new tab
  30. a paragraph
  31. answers page requests
  32. a web server
  33. A tiger asleep
  34. width
  35. line 2
  36. 4
  37. a web browser
  38. 3
  39. href
  40. <h1>

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