← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 627 · 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 line is missing its closing tag?
    line 1: <strong>Rain today</strong>
    line 2: <h1>Hello, world!
    line 3: <h2>Fun facts</h2>
    (a) line 2 (b) line 3 (c) line 1
  2. 2.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Kites fly high<br>Roses are red<br>Rivers flow<br>Birds sing</p>
  3. 3.📋 Which list tag lists steps in order? (a) <ul> (b) <li> (c) <ol>
  4. 4.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  5. 5.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
  6. 6.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <h3>My best friend</h3>
    <p>My pets</p>
    <h4>I love mangoes.</h4>
  7. 7.True or false: a web browser shows pages from the web. (a) True (b) False
  8. 8.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
  9. 9.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) My Hobbies (b) body (c) We won by 5 runs. (d) My drawings
  10. 10.True or false: <ul> shows bullet points. (a) True (b) False
  11. 11.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h4> or <h5>? (a) <h5> (b) <h4> (c) <h3> (d) <h2>
  12. 12.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
  13. 13.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Roses are red<br>Rivers flow<br>Sky is blue<br>Birds sing</p>
  14. 14.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  15. 15.🧱 HTML gives a web page its ___. (a) structure (b) sound (c) speed (d) colours
  16. 16.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) opens it in a new tab (d) makes it bold
  17. 17.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
    <!-- <p>The red kite</p> -->
    (a) Cricket is fun. (b) Good morning! (c) The red kite (d) Fun facts
  18. 18.True or false: in <img>, width shows if the image fails. (a) True (b) False
  19. 19.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h4>Good morning!</h4>
    <p>Good morning!</p>
  20. 20.🔍 Which line is missing its closing tag?
    line 1: <h2>Fun facts</h2>
    line 2: <i>Hello, world!
    line 3: <small>Cricket is fun.</small>
    (a) line 3 (b) line 1 (c) line 2
  21. 21.Which of these is an empty tag? (a) <p> (b) <h1> (c) <ul> (d) <input>
  22. 22.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h2> or <h1>? (a) <h5> (b) <h4> (c) <h1> (d) <h2>
  23. 23.📛 In <a href="x.html">, what is href? (a) an element name (b) an attribute (c) a comment (d) a closing tag
  24. 24.🔢 In a basic web page file, which comes first: “</head>” or “<head>”? (a) </head> (b) <head>
  25. 25.🔗 Which address opens when you click this link?
    <a href="maths.html">Take the quiz</a>
    (a) maths.html (b) news.html (c) Take the quiz (d) art.html
  26. 26.🏷️ Which is the closing tag for <h2>? (a) </h2> (b) <\h2> (c) <h2/> (d) <h2>
  27. 27.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>Hello, world!</p>
    <p>My best friend</p>
    <h2>The red kite</h2>
    <p>Fun facts</p>
  28. 28.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <!-- <p>The red kite</p> -->
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Hello, world!</p> -->
    <!-- <p>My best friend</p> -->
  29. 29.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) All about me (b) index.html (c) Class 7 Blog (d) I like to read.
  30. 30.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>I love mangoes.</p>
    <h2>Cricket is fun.</h2>
    <p>Hello, world!</p>
  31. 31.🔗 What does HyperText mean? (a) very big text (b) secret text (c) text in colour (d) text with links
  32. 32.🔗 Which words do you click on?
    <a href="games.html">About us</a>
    (a) href (b) Contact us (c) games.html (d) About us
  33. 33.True or false: <table> goes in the body. (a) True (b) False
  34. 34.True or false: <li> is an unordered list. (a) True (b) False
  35. 35.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <!-- <p>Fun facts</p> -->
    <p>I love mangoes.</p>
    (a) I love mangoes. (b) Fun facts (c) The red kite
  36. 36.📄 What is the first line of an HTML5 page? (a) <html> (b) <head> (c) <body> (d) <!DOCTYPE html>
  37. 37.🔍 Which line is missing its closing tag?
    line 1: <h3>Our school trip</h3>
    line 2: <h2>Rain today</h2>
    line 3: <p>My best friend
    (a) line 3 (b) line 2 (c) line 1
  38. 38.📋 Does this list show bullets or numbers?
    <ol>
      <li>Litchi</li>
      <li>Banana</li>
    </ol>
    (a) bullets (b) numbers
  39. 39.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  40. 40.True or false: in <img>, height sets how tall it is. (a) True (b) False

Answer key

  1. line 2
  2. 5
  3. <ol>
  4. an opening tag
  5. in the head
  6. 3
  7. True
  8. in the body
  9. My drawings
  10. True
  11. <h2>
  12. in the head
  13. 5
  14. Yes
  15. structure
  16. opens it in a new tab
  17. The red kite
  18. False
  19. 2
  20. line 2
  21. <input>
  22. <h1>
  23. an attribute
  24. <head>
  25. maths.html
  26. </h2>
  27. 2
  28. 1
  29. Class 7 Blog
  30. 2
  31. text with links
  32. About us
  33. True
  34. False
  35. Fun facts
  36. <!DOCTYPE html>
  37. line 3
  38. numbers
  39. an opening tag
  40. True

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