← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 277 · 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>Roses are red<br>Sky is blue<br>Stars shine</p>
  2. 2.🔍 Which line is missing its closing tag?
    line 1: <h1>Good morning!
    line 2: <em>Cricket is fun.</em>
    line 3: <h2>Our school trip</h2>
    (a) line 1 (b) line 3 (c) line 2
  3. 3.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Grapes</li>
      <li>Litchi</li>
    </ul>
    (a) bullets (b) numbers
  4. 4.🔍 Which is the odd one out? (a) has an address bar (b) shows pages from the web (c) opens web pages for us (d) colours code to help us
  5. 5.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h2> or <h3>? (a) <h4> (b) <h3> (c) <h1> (d) <h2>
  6. 6.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <p>I love mangoes.</p>
    <!-- <p>The red kite</p> -->
    <p>My pets</p>
  7. 7.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h2>Cricket is fun.</h2>
    <h3>I love mangoes.</h3>
    <h2>Cricket is fun.</h2>
    <p>I love mangoes.</p>
  8. 8.🔗 Which words do you click on?
    <a href="art.html">Take the quiz</a>
    (a) href (b) Take the quiz (c) art.html (d) Play games
  9. 9.True or false: HTML on its own can make links to pages. (a) False (b) True
  10. 10.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as 5 spaces (c) as one space (d) as a new line
  11. 11.📄 Which part holds everything you see on the page? (a) the title (b) the body (c) the doctype (d) the head
  12. 12.📄 What is the first line of an HTML5 page? (a) <body> (b) <head> (c) <html> (d) <!DOCTYPE html>
  13. 13.🔍 One closing tag is missing. Which one?
    <em>I love mangoes.
    <small>Our school trip</small>
    <strong>Rain today</strong>
    (a) </small> (b) </i> (c) </em> (d) </strong>
  14. 14.🖼️ Which tag puts a picture on a page? (a) <p> (b) <img> (c) <pic> (d) <a>
  15. 15.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <link about.html> (c) <a src="about.html"> (d) <a alt="about.html">
  16. 16.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <h2>Fun facts</h2>
    <h2>Cricket is fun.</h2>
  17. 17.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  18. 18.🔠 Which heading shows the SMALLEST text: <h4>, <h2>, <h6> or <h3>? (a) <h2> (b) <h3> (c) <h4> (d) <h6>
  19. 19.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="300">
  20. 20.Which of these is true of a web server? (a) is where we type code (b) shows line numbers (c) has an address bar (d) sends pages over the net
  21. 21.🏷️ Is </h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  22. 22.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) address (c) editor (d) element
  23. 23.🔗 Which words do you click on?
    <a href="https://example.com">School news</a>
    (a) School news (b) https://example.com (c) Take the quiz (d) href
  24. 24.🔍 Which is the odd one out? (a) colours code to help us (b) is where we type code (c) sends pages over the net (d) saves our .html files
  25. 25.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  26. 26.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <p>Fun facts</p>
    <p>Our school trip</p>
  27. 27.True or false: HTML on its own cannot make headings. (a) False (b) True
  28. 28.Which of these goes in the head? (a) <meta charset="utf-8"> (b) <img> (c) <table> (d) <h1>
  29. 29.True or false: <title> is an empty tag. (a) False (b) True
  30. 30.🌍 Which program shows a web page to us? (a) a paint program (b) a web browser (c) a calculator (d) a music player
  31. 31.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  32. 32.📄 Where does <a> go: in the head or in the body? (a) in the body (b) in the head
  33. 33.True or false: a code editor opens web pages for us. (a) True (b) False
  34. 34.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <p>Our school trip</p>
    <h2>My pets</h2>
    <h2>Our school trip</h2>
    <h2>Good morning!</h2>
  35. 35.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ol> (c) <br> (d) <ul>
  36. 36.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an attribute (c) a comment (d) an element name
  37. 37.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="50">
  38. 38.💬 How does an HTML comment start? (a) // (b) <!-- (c) /* (d) #
  39. 39.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
  40. 40.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag

Answer key

  1. 3
  2. line 1
  3. bullets
  4. colours code to help us
  5. <h4>
  6. 3
  7. 4
  8. Take the quiz
  9. True
  10. as one space
  11. the body
  12. <!DOCTYPE html>
  13. </em>
  14. <img>
  15. <a href="about.html">
  16. 1
  17. Yes
  18. <h6>
  19. 300
  20. sends pages over the net
  21. a closing tag
  22. element
  23. School news
  24. sends pages over the net
  25. Yes
  26. 3
  27. False
  28. <meta charset="utf-8">
  29. False
  30. a web browser
  31. an opening tag
  32. in the body
  33. False
  34. 2
  35. <ul>
  36. an attribute
  37. 50
  38. <!--
  39. in the head
  40. has a closing tag

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