← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 316 · 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.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <!-- <p>Fun facts</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <p>My pets</p>
  2. 2.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <p>Good morning!</p>
    <p>My best friend</p>
    <!-- <p>My pets</p> -->
  3. 3.🔍 One closing tag is missing. Which one?
    <h2>The red kite
    <u>My best friend</u>
    <h3>Rain today</h3>
    (a) </h2> (b) </h3> (c) </u> (d) </b>
  4. 4.True or false: a web server saves our .html files. (a) True (b) False
  5. 5.🔗 Which address opens when you click this link?
    <a href="contact.html">Art corner</a>
    (a) maths.html (b) https://example.com (c) contact.html (d) Art corner
  6. 6.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <a> (d) <img>
  7. 7.Which of these has a closing tag? (a) <br> (b) <b> (c) <hr> (d) <img>
  8. 8.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="300">
    (a) width (b) kite.png (c) A red kite (d) Map of India
  9. 9.📋 Which tag goes around each item of a list? (a) <ul> (b) <p> (c) <li> (d) <ol>
  10. 10.💬 How does an HTML comment end? (a) >> (b) // (c) --> (d) */
  11. 11.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Stars shine</p>
  12. 12.🏷️ Which is the closing tag for <strong>? (a) <strong> (b) <\strong> (c) </strong> (d) <strong/>
  13. 13.📋 Which list tag is an ordered list? (a) <ul> (b) <li> (c) <ol>
  14. 14.True or false: in <img>, src names the picture file. (a) False (b) True
  15. 15.🌐 Which one has an address bar? (a) a web browser (b) a code editor (c) a web server
  16. 16.🔢 In a basic web page file, which comes LAST? (a) <!DOCTYPE html> (b) </head> (c) <head> (d) </html>
  17. 17.🔗 What does target="_blank" do to a link? (a) makes it bold (b) opens it in a new tab (c) hides the link (d) makes it blank
  18. 18.True or false: <hr> has a closing tag. (a) False (b) True
  19. 19.🔗 Which words do you click on?
    <a href="contact.html">Visit the site</a>
    (a) href (b) contact.html (c) Maths fun (d) Visit the site
  20. 20.True or false: <title> goes in the body. (a) False (b) True
  21. 21.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="200">
    (a) width (b) kite.png (c) Map of India (d) A red kite
  22. 22.💬 Why do coders write comments? (a) to make links (b) to add colour (c) to show pictures (d) to leave notes
  23. 23.📝 What does <hr> draw? (a) a picture (b) a table (c) a line across the page (d) a link
  24. 24.📋 Does this list show bullets or numbers?
    <ul>
      <li>Orange</li>
      <li>Banana</li>
      <li>Litchi</li>
    </ul>
    (a) numbers (b) bullets
  25. 25.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <p>Rain today</p>
    <p>The red kite</p>
    <p>Fun facts</p>
    <p>Cricket is fun.</p>
  26. 26.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h5> or <h3>? (a) <h6> (b) <h5> (c) <h3> (d) <h4>
  27. 27.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Fun facts</p> -->
    <p>The red kite</p>
  28. 28.📝 Does <li> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  29. 29.🔗 Which words do you click on?
    <a href="art.html">Play games</a>
    (a) art.html (b) href (c) About us (d) Play games
  30. 30.📝 What does <p> make? (a) a picture (b) a paragraph (c) a link (d) a table
  31. 31.📋 How many items does this list show?
    <ul>
      <li>Papaya</li>
      <li>Guava</li>
      <li>Jamun</li>
    </ul>
  32. 32.🔗 Which words do you click on?
    <a href="contact.html">School news</a>
    (a) contact.html (b) Take the quiz (c) School news (d) href
  33. 33.Which of these is an opening tag? (a) </p> (b) </body> (c) </b> (d) <b>
  34. 34.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  35. 35.Which of these is true of a code editor? (a) opens web pages for us (b) stores a website’s files (c) is where we type code (d) hosts websites online
  36. 36.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>I love mangoes.</p>
    <!-- <p>My best friend</p> -->
    <p>Hello, world!</p>
    <!-- <p>Our school trip</p> -->
  37. 37.🔗 Where does this link open?
    <a href="contact.html">School news</a>
    (a) in a new tab (b) in the same tab
  38. 38.True or false: a web server shows pages from the web. (a) True (b) False
  39. 39.Which of these goes in the body? (a) <title> (b) <link rel="stylesheet"> (c) <a> (d) <meta charset="utf-8">
  40. 40.📋 Which list tag shows 1, 2, 3 numbers? (a) <ul> (b) <ol> (c) <li>

Answer key

  1. 1
  2. 3
  3. </h2>
  4. False
  5. contact.html
  6. <a>
  7. <b>
  8. A red kite
  9. <li>
  10. -->
  11. 2
  12. </strong>
  13. <ol>
  14. True
  15. a web browser
  16. </html>
  17. opens it in a new tab
  18. False
  19. Visit the site
  20. False
  21. A red kite
  22. to leave notes
  23. a line across the page
  24. bullets
  25. 5
  26. <h3>
  27. 2
  28. has a closing tag
  29. Play games
  30. a paragraph
  31. 3
  32. School news
  33. <b>
  34. has a closing tag
  35. is where we type code
  36. 2
  37. in the same tab
  38. False
  39. <a>
  40. <ol>

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