← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 665 · 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 one shows pages from the web? (a) a web server (b) a code editor (c) a web browser
  2. 2.True or false: <link rel="stylesheet"> goes in the head. (a) False (b) True
  3. 3.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  4. 4.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Cricket is fun.</p>
    <p>My best friend</p>
    <!-- <p>The red kite</p> -->
    <p>My pets</p>
  5. 5.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h2>My pets</h2>
    <h3>My best friend</h3>
    <h2>My best friend</h2>
    <h2>Good morning!</h2>
  6. 6.📝 What does <br> do? (a) makes text bold (b) makes a list (c) adds a picture (d) starts a new line
  7. 7.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False
  8. 8.🔗 Which words do you click on?
    <a href="about.html">Contact us</a>
    (a) Visit the site (b) about.html (c) Contact us (d) href
  9. 9.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  10. 10.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) index.html (b) Planets (c) Here is my best one. (d) Cricket Club
  11. 11.🏷️ Which is the closing tag for <h2>? (a) <h2> (b) <h2/> (c) <\h2> (d) </h2>
  12. 12.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  13. 13.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h2> or <h1>? (a) <h2> (b) <h4> (c) <h5> (d) <h1>
  14. 14.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="200">
  15. 15.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) src (c) alt (d) height
  16. 16.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <a> (d) <img>
  17. 17.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <link about.html> (c) <a alt="about.html"> (d) <a src="about.html">
  18. 18.💬 How does an HTML comment start? (a) <!-- (b) # (c) /* (d) //
  19. 19.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Roses are red</p>
  20. 20.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Good morning!</p> -->
    <!-- <p>Our school trip</p> -->
    <p>My pets</p>
    <!-- <p>Cricket is fun.</p> -->
  21. 21.True or false: <li> is an unordered list. (a) False (b) True
  22. 22.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  23. 23.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <html> (c) <body> (d) <head>
  24. 24.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  25. 25.True or false: <table> goes in the head. (a) True (b) False
  26. 26.True or false: <ul> lists steps in order. (a) False (b) True
  27. 27.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Easy snacks (b) Class 7 Blog (c) index.html (d) I like to read.
  28. 28.Which of these is true of a web server? (a) saves our .html files (b) stores a website’s files (c) turns HTML into a page (d) opens web pages for us
  29. 29.📋 How many items does this list show?
    <ol>
      <li>Guava</li>
      <li>Litchi</li>
    </ol>
  30. 30.Which of these is an empty tag? (a) <hr> (b) <li> (c) <b> (d) <p>
  31. 31.🔢 In a basic web page file, which comes FIRST? (a) <body> (b) <!DOCTYPE html> (c) </head> (d) </html>
  32. 32.Which of these is a closing tag? (a) </b> (b) <body> (c) <b> (d) <h1>
  33. 33.🏷️ Which is the closing tag for <em>? (a) </em> (b) <em> (c) <\em> (d) <em/>
  34. 34.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  35. 35.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <h2>Our school trip</h2>
    <p>My best friend</p>
    <h2>Hello, world!</h2>
    <h2>Rain today</h2>
  36. 36.True or false: <li> is an empty tag. (a) True (b) False
  37. 37.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h5> or <h3>? (a) <h3> (b) <h2> (c) <h1> (d) <h5>
  38. 38.📋 What number does the browser show next to “Guava”?
    <ol start="3">
      <li>Orange</li>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Litchi</li>
    </ol>
  39. 39.Which of these is a closing tag? (a) <p> (b) <h1> (c) </li> (d) <body>
  40. 40.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “</body>”? (a) </body> (b) <!DOCTYPE html>

Answer key

  1. a web browser
  2. True
  3. No
  4. 3
  5. 5
  6. starts a new line
  7. False
  8. Contact us
  9. has a closing tag
  10. Cricket Club
  11. </h2>
  12. an opening tag
  13. <h1>
  14. 200
  15. width
  16. <img>
  17. <a href="about.html">
  18. <!--
  19. 2
  20. 1
  21. False
  22. a closing tag
  23. <!DOCTYPE html>
  24. Yes
  25. False
  26. False
  27. Class 7 Blog
  28. stores a website’s files
  29. 2
  30. <hr>
  31. <!DOCTYPE html>
  32. </b>
  33. </em>
  34. Yes
  35. 2
  36. False
  37. <h1>
  38. 5
  39. </li>
  40. <!DOCTYPE html>

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