← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 143 · 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 is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) All about me (b) body (c) Here is my best one. (d) Class 7 Blog
  2. 2.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <!-- <p>Good morning!</p> -->
    <p>Rain today</p>
  3. 3.🔗 Where does this link open?
    <a href="maths.html">Art corner</a>
    (a) in the same tab (b) in a new tab
  4. 4.True or false: in <img>, alt tells which image to load. (a) True (b) False
  5. 5.🏷️ Which is the closing tag for <small>? (a) <\small> (b) <small/> (c) <small> (d) </small>
  6. 6.True or false: <link rel="stylesheet"> goes in the body. (a) False (b) True
  7. 7.🔍 Which is the odd one out? (a) has an address bar (b) turns HTML into a page (c) is where we type code (d) shows pages from the web
  8. 8.🏷️ Which is the closing tag for <u>? (a) </u> (b) <u/> (c) <\u> (d) <u>
  9. 9.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Kites fly high</p>
  10. 10.🔗 Which words do you click on?
    <a href="news.html">Play games</a>
    (a) news.html (b) About us (c) Play games (d) href
  11. 11.🖼️ Which tag puts a picture on a page? (a) <img> (b) <a> (c) <pic> (d) <p>
  12. 12.🔍 Which line is missing its closing tag?
    line 1: <strong>Cricket is fun.</strong>
    line 2: <em>Our school trip</em>
    line 3: <b>Fun facts
    (a) line 2 (b) line 3 (c) line 1
  13. 13.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) src (c) height (d) alt
  14. 14.🔗 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
  15. 15.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) index.html (b) Mars is red. (c) Welcome! (d) Riya’s Recipes
  16. 16.🔍 Which line is missing its closing tag?
    line 1: <em>I love mangoes.</em>
    line 2: <u>Cricket is fun.</u>
    line 3: <small>My pets
    (a) line 2 (b) line 1 (c) line 3
  17. 17.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  18. 18.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>Cricket is fun.</p>
    <h2>Fun facts</h2>
    <h2>Fun facts</h2>
    <h2>I love mangoes.</h2>
    <p>The red kite</p>
  19. 19.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h2> or <h6>? (a) <h6> (b) <h1> (c) <h2> (d) <h4>
  20. 20.Which of these is an empty tag? (a) <p> (b) <h1> (c) <li> (d) <br>
  21. 21.📄 Where does the text of <title> appear? (a) in a big heading (b) on the browser tab (c) at the bottom (d) nowhere
  22. 22.🔠 How many heading levels does HTML have? (a) 4 (b) 10 (c) 3 (d) 6
  23. 23.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>My pets</p>
    <p>Good morning!</p>
    (a) My pets (b) Rain today (c) Good morning!
  24. 24.🔗 Where does this link open?
    <a href="contact.html">School news</a>
    (a) in a new tab (b) in the same tab
  25. 25.📋 How many items does this list show?
    <ul>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Litchi</li>
    </ul>
  26. 26.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <p> (d) <link>
  27. 27.🌐 Which one answers page requests? (a) a code editor (b) a web server (c) a web browser
  28. 28.💬 Does the browser show comments on the page? (a) Yes (b) No
  29. 29.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  30. 30.True or false: HTML on its own can make a form. (a) False (b) True
  31. 31.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h2> or <h3>? (a) <h1> (b) <h4> (c) <h2> (d) <h3>
  32. 32.📋 Which list tag is one item of a list? (a) <ul> (b) <li> (c) <ol>
  33. 33.💬 How does an HTML comment start? (a) /* (b) <!-- (c) # (d) //
  34. 34.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Rivers flow<br>Roses are red</p>
  35. 35.🌐 Which one stores a website’s files? (a) a web browser (b) a code editor (c) a web server
  36. 36.🔍 Which is the odd one out? (a) answers page requests (b) saves our .html files (c) is where we type code (d) colours code to help us
  37. 37.True or false: a web browser has an address bar. (a) True (b) False
  38. 38.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h4> or <h6>? (a) <h1> (b) <h4> (c) <h3> (d) <h6>
  39. 39.🏷️ Which is the closing tag for <h1>? (a) <h1/> (b) </h1> (c) <h1> (d) <\h1>
  40. 40.📋 How many items does this list show?
    <ul>
      <li>Papaya</li>
      <li>Guava</li>
      <li>Orange</li>
    </ul>

Answer key

  1. All about me
  2. 2
  3. in the same tab
  4. False
  5. </small>
  6. False
  7. is where we type code
  8. </u>
  9. 2
  10. Play games
  11. <img>
  12. line 3
  13. width
  14. opens it in a new tab
  15. Riya’s Recipes
  16. line 3
  17. an opening tag
  18. 3
  19. <h1>
  20. <br>
  21. on the browser tab
  22. 6
  23. Rain today
  24. in the same tab
  25. 3
  26. <a>
  27. a web server
  28. No
  29. No
  30. True
  31. <h1>
  32. <li>
  33. <!--
  34. 3
  35. a web server
  36. answers page requests
  37. True
  38. <h1>
  39. </h1>
  40. 3

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