← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 423 · 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 attribute holds the address of a link? (a) href (b) src (c) alt (d) id
  2. 2.📋 Which tag goes around each item of a list? (a) <li> (b) <ol> (c) <p> (d) <ul>
  3. 3.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <p>Good morning!</p>
    <!-- <p>Fun facts</p> -->
    (a) Hello, world! (b) Fun facts (c) Good morning!
  4. 4.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an attribute (c) a comment (d) an element name
  5. 5.True or false: a code editor is where we type code. (a) False (b) True
  6. 6.True or false: HTML on its own cannot show paragraphs. (a) False (b) True
  7. 7.Which of these has a closing tag? (a) <meta> (b) <br> (c) <input> (d) <ul>
  8. 8.📝 Does <input> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  9. 9.🔗 Which words do you click on?
    <a href="maths.html">Contact us</a>
    (a) maths.html (b) href (c) Visit the site (d) Contact us
  10. 10.🔗 Which tag makes a clickable link? (a) <a> (b) <img> (c) <link> (d) <p>
  11. 11.📋 Does this list show bullets or numbers?
    <ul>
      <li>Jamun</li>
      <li>Litchi</li>
    </ul>
    (a) numbers (b) bullets
  12. 12.📋 How many items does this list show?
    <ol>
      <li>Grapes</li>
      <li>Guava</li>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Orange</li>
      <li>Litchi</li>
    </ol>
  13. 13.🔍 One closing tag is missing. Which one?
    <h3>Hello, world!
    <u>Rain today</u>
    <small>My pets</small>
    (a) </u> (b) </b> (c) </h3> (d) </small>
  14. 14.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h3>The red kite</h3>
    <p>Fun facts</p>
    <p>The red kite</p>
    <h3>Fun facts</h3>
  15. 15.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="50">
    (a) width (b) Birthday cake (c) map.png (d) Map of India
  16. 16.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) We won by 5 runs. (b) Space Facts (c) All about me (d) index.html
  17. 17.🔢 In a basic web page file, which comes LAST? (a) <html> (b) <!DOCTYPE html> (c) </html> (d) <body>
  18. 18.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  19. 19.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h1> or <h6>? (a) <h2> (b) <h6> (c) <h3> (d) <h1>
  20. 20.True or false: HTML on its own cannot make headings. (a) False (b) True
  21. 21.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  22. 22.📄 Where does the text of <title> appear? (a) in a big heading (b) nowhere (c) on the browser tab (d) at the bottom
  23. 23.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ul> (c) <br> (d) <ol>
  24. 24.📄 What is the first line of an HTML5 page? (a) <body> (b) <!DOCTYPE html> (c) <head> (d) <html>
  25. 25.Which of these is true of a web browser? (a) is where we type code (b) stores a website’s files (c) hosts websites online (d) has an address bar
  26. 26.🔗 What does target="_blank" do to a link? (a) makes it blank (b) makes it bold (c) hides the link (d) opens it in a new tab
  27. 27.Which of these has a closing tag? (a) <meta> (b) <br> (c) <input> (d) <h1>
  28. 28.🔍 Which line is missing its closing tag?
    line 1: <i>Rain today</i>
    line 2: <h1>Fun facts
    line 3: <h2>Hello, world!</h2>
    (a) line 3 (b) line 1 (c) line 2
  29. 29.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  30. 30.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="400">
    (a) An old fort (b) kite.png (c) fort.jpg (d) tiger.jpg
  31. 31.📋 How many items does this list show?
    <ol>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Orange</li>
      <li>Guava</li>
    </ol>
  32. 32.💬 How does an HTML comment start? (a) // (b) /* (c) # (d) <!--
  33. 33.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>Fun facts</p>
    <p>Hello, world!</p>
    <!-- <p>Cricket is fun.</p> -->
    (a) Cricket is fun. (b) Hello, world! (c) My pets (d) Fun facts
  34. 34.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  35. 35.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <!-- <p>My pets</p> -->
    <p>I love mangoes.</p>
  36. 36.🔍 Which is the odd one out? (a) shows line numbers (b) sends pages over the net (c) colours code to help us (d) saves our .html files
  37. 37.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  38. 38.📋 Does this list show bullets or numbers?
    <ol>
      <li>Orange</li>
      <li>Guava</li>
    </ol>
    (a) numbers (b) bullets
  39. 39.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
  40. 40.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <p>Good morning!</p>
    <p>My pets</p>
    <!-- <p>Rain today</p> -->
    (a) Cricket is fun. (b) Rain today (c) Good morning! (d) My pets

Answer key

  1. href
  2. <li>
  3. Fun facts
  4. an attribute
  5. True
  6. False
  7. <ul>
  8. an empty tag
  9. Contact us
  10. <a>
  11. bullets
  12. 6
  13. </h3>
  14. 3
  15. Map of India
  16. Space Facts
  17. </html>
  18. No
  19. <h1>
  20. False
  21. Yes
  22. on the browser tab
  23. <ul>
  24. <!DOCTYPE html>
  25. has an address bar
  26. opens it in a new tab
  27. <h1>
  28. line 2
  29. Yes
  30. fort.jpg
  31. 4
  32. <!--
  33. Cricket is fun.
  34. an opening tag
  35. 2
  36. sends pages over the net
  37. a closing tag
  38. numbers
  39. in the body
  40. Rain today

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