← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 626 · 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.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Birds sing<br>Stars shine</p>
  2. 2.🔗 Where does this link open?
    <a href="maths.html" target="_blank">About us</a>
    (a) in the same tab (b) in a new tab
  3. 3.🔢 In a basic web page file, which comes LAST? (a) <html> (b) <!DOCTYPE html> (c) <body> (d) </html>
  4. 4.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  5. 5.📄 Where does <a> go: in the head or in the body? (a) in the body (b) in the head
  6. 6.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) Art Gallery (b) We won by 5 runs. (c) body (d) Planets
  7. 7.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h3> or <h4>? (a) <h3> (b) <h4> (c) <h1> (d) <h2>
  8. 8.🔗 What does HyperText mean? (a) very big text (b) text with links (c) text in colour (d) secret text
  9. 9.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Birds sing<br>Kites fly high<br>Stars shine<br>Sky is blue</p>
  10. 10.🖼️ Which attribute of <img> sets how tall it is? (a) height (b) width (c) src (d) alt
  11. 11.Which of these is true of a web server? (a) opens web pages for us (b) saves our .html files (c) shows pages from the web (d) answers page requests
  12. 12.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="100">
    (a) moon.png (b) Our school bus (c) width (d) The full moon
  13. 13.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <!-- <p>My best friend</p> -->
    <p>Good morning!</p>
  14. 14.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h5>? (a) <h5> (b) <h2> (c) <h1> (d) <h4>
  15. 15.Which of these is a closing tag? (a) </body> (b) <body> (c) <b> (d) <li>
  16. 16.True or false: HTML on its own cannot make a form. (a) True (b) False
  17. 17.🧱 HTML gives a web page its ___. (a) speed (b) colours (c) sound (d) structure
  18. 18.Which of these is true of a web browser? (a) colours code to help us (b) stores a website’s files (c) hosts websites online (d) opens web pages for us
  19. 19.True or false: <ol> shows bullet points. (a) False (b) True
  20. 20.🔍 Which is the odd one out? (a) stores a website’s files (b) hosts websites online (c) shows pages from the web (d) answers page requests
  21. 21.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="100">
    (a) dog.jpg (b) moon.png (c) A happy dog (d) bus.jpg
  22. 22.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <!-- <p>My best friend</p> -->
    <p>I love mangoes.</p>
  23. 23.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a alt="about.html"> (c) <a src="about.html"> (d) <link about.html>
  24. 24.🌐 Which one colours code to help us? (a) a web browser (b) a web server (c) a code editor
  25. 25.🌐 Which one sends pages over the net? (a) a code editor (b) a web browser (c) a web server
  26. 26.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h5> or <h2>? (a) <h2> (b) <h4> (c) <h1> (d) <h5>
  27. 27.💬 How does an HTML comment start? (a) # (b) <!-- (c) // (d) /*
  28. 28.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) address (c) element (d) attribute
  29. 29.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as one space (c) as a dot (d) as a new line
  30. 30.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <p>My best friend</p>
    <p>Good morning!</p>
    <p>I love mangoes.</p>
  31. 31.🔠 Are headings shown in bold by default? (a) Yes (b) No
  32. 32.📝 Does <input> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  33. 33.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
  34. 34.🔗 Which address opens when you click this link?
    <a href="about.html">About us</a>
    (a) contact.html (b) About us (c) https://example.com (d) about.html
  35. 35.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
  36. 36.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
  37. 37.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a hash # (c) a dollar $ (d) a slash /
  38. 38.💬 Which text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>My best friend</p>
    <p>Our school trip</p>
    <p>Good morning!</p>
    (a) My pets (b) My best friend (c) Our school trip (d) Good morning!
  39. 39.📋 How many items does this list show?
    <ul>
      <li>Grapes</li>
      <li>Banana</li>
    </ul>
  40. 40.True or false: HTML on its own cannot pick a random number. (a) False (b) True

Answer key

  1. 3
  2. in a new tab
  3. </html>
  4. a closing tag
  5. in the body
  6. Planets
  7. <h4>
  8. text with links
  9. 5
  10. height
  11. answers page requests
  12. The full moon
  13. 2
  14. <h1>
  15. </body>
  16. False
  17. structure
  18. opens web pages for us
  19. False
  20. shows pages from the web
  21. dog.jpg
  22. 2
  23. <a href="about.html">
  24. a code editor
  25. a web server
  26. <h1>
  27. <!--
  28. element
  29. as one space
  30. 1
  31. Yes
  32. an empty tag
  33. in the body
  34. about.html
  35. Yes
  36. Yes
  37. a slash /
  38. My pets
  39. 2
  40. True

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