← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 89 · 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>My pets</p>
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
    <!-- <p>I love mangoes.</p> -->
  2. 2.📝 What does <hr> draw? (a) a picture (b) a line across the page (c) a link (d) a table
  3. 3.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
  4. 4.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Roses are red</p>
  5. 5.🌐 Which one saves our .html files? (a) a code editor (b) a web server (c) a web browser
  6. 6.🔍 Which is the odd one out? (a) stores a website’s files (b) is where we type code (c) answers page requests (d) sends pages over the net
  7. 7.True or false: in <img>, height tells which image to load. (a) False (b) True
  8. 8.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
  9. 9.📋 How many items does this list show?
    <ol>
      <li>Mango</li>
      <li>Guava</li>
    </ol>
  10. 10.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="400">
  11. 11.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  12. 12.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  13. 13.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>Fun facts</p>
    <h3>I love mangoes.</h3>
  14. 14.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h4> or <h5>? (a) <h6> (b) <h1> (c) <h5> (d) <h4>
  15. 15.True or false: in <img>, alt sets how wide it is. (a) False (b) True
  16. 16.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an attribute (c) a comment (d) an element name
  17. 17.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>My pets</p> -->
    <p>Hello, world!</p>
    <p>Good morning!</p>
  18. 18.Which of these goes in the head? (a) <link rel="stylesheet"> (b) <ul> (c) <h1> (d) <p>
  19. 19.🔍 Which line is missing its closing tag?
    line 1: <h1>I love mangoes.</h1>
    line 2: <h2>Good morning!
    line 3: <u>Cricket is fun.</u>
    (a) line 1 (b) line 2 (c) line 3
  20. 20.📝 Does <img> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  21. 21.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>My pets</p>
    <!-- <p>Good morning!</p> -->
    (a) Good morning! (b) Fun facts (c) My pets
  22. 22.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
  23. 23.🔗 What does HyperText mean? (a) text in colour (b) text with links (c) secret text (d) very big text
  24. 24.🔤 In “HTML”, what does the M stand for? (a) Machine (b) Markup (c) Modern (d) Mouse
  25. 25.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <h2>Rain today</h2>
    <p>Fun facts</p>
    <h2>Hello, world!</h2>
    <p>The red kite</p>
    <p>My pets</p>
  26. 26.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Grapes</li>
    </ul>
    (a) numbers (b) bullets
  27. 27.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="350">
    (a) An old fort (b) width (c) Our school bus (d) bus.jpg
  28. 28.True or false: <ul> is an unordered list. (a) True (b) False
  29. 29.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h6> or <h5>? (a) <h4> (b) <h6> (c) <h5> (d) <h2>
  30. 30.🔍 One closing tag is missing. Which one?
    <h3>Our school trip</h3>
    <h1>I love mangoes.</h1>
    <strong>Rain today
    (a) </strong> (b) </h3> (c) </h1> (d) </p>
  31. 31.Which of these is true of a web browser? (a) sends pages over the net (b) hosts websites online (c) shows pages from the web (d) stores a website’s files
  32. 32.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>My pets</p>
    <!-- <p>Hello, world!</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>Rain today</p> -->
  33. 33.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h3>Our school trip</h3>
    <h2>Fun facts</h2>
  34. 34.🔠 Which heading shows the SMALLEST text: <h5>, <h3>, <h1> or <h4>? (a) <h5> (b) <h3> (c) <h1> (d) <h4>
  35. 35.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Thanks for visiting. (b) My Hobbies (c) index.html (d) Planets
  36. 36.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  37. 37.🔠 Which heading shows the SMALLEST text: <h4>, <h6>, <h1> or <h3>? (a) <h6> (b) <h1> (c) <h3> (d) <h4>
  38. 38.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
  39. 39.🔗 Which address opens when you click this link?
    <a href="art.html">School news</a>
    (a) School news (b) quiz.html (c) art.html (d) news.html
  40. 40.🔗 Which tag makes a clickable link? (a) <a> (b) <p> (c) <link> (d) <img>

Answer key

  1. 3
  2. a line across the page
  3. in the head
  4. 2
  5. a code editor
  6. is where we type code
  7. False
  8. in the head
  9. 2
  10. 400
  11. a closing tag
  12. Yes
  13. 2
  14. <h1>
  15. False
  16. an attribute
  17. 3
  18. <link rel="stylesheet">
  19. line 2
  20. an empty tag
  21. Good morning!
  22. No
  23. text with links
  24. Markup
  25. 4
  26. bullets
  27. Our school bus
  28. True
  29. <h6>
  30. </strong>
  31. shows pages from the web
  32. 1
  33. 3
  34. <h5>
  35. My Hobbies
  36. an opening tag
  37. <h6>
  38. in the head
  39. art.html
  40. <a>

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