← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 569 · 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 tag makes a clickable link? (a) <link> (b) <img> (c) <p> (d) <a>
  2. 2.📄 Where does the text of <title> appear? (a) in a big heading (b) nowhere (c) at the bottom (d) on the browser tab
  3. 3.🌐 Which one sends pages over the net? (a) a code editor (b) a web browser (c) a web server
  4. 4.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h6> or <h4>? (a) <h2> (b) <h3> (c) <h4> (d) <h6>
  5. 5.True or false: <ul> is an ordered list. (a) False (b) True
  6. 6.🔍 Which is the odd one out? (a) shows line numbers (b) is where we type code (c) saves our .html files (d) turns HTML into a page
  7. 7.📋 Which list tag goes inside ul or ol? (a) <ol> (b) <li> (c) <ul>
  8. 8.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  9. 9.🏷️ Which is the closing tag for <h3>? (a) <\h3> (b) <h3> (c) <h3/> (d) </h3>
  10. 10.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h3>Our school trip</h3>
    <p>I love mangoes.</p>
    <h4>Hello, world!</h4>
  11. 11.🏷️ Every HTML tag starts with which sign? (a) { (b) [ (c) < (d) (
  12. 12.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="200">
    (a) moon.png (b) bus.jpg (c) fort.jpg (d) The full moon
  13. 13.🔍 Which is the odd one out? (a) shows line numbers (b) shows pages from the web (c) is where we type code (d) colours code to help us
  14. 14.🔍 Which is the odd one out? (a) answers page requests (b) sends pages over the net (c) hosts websites online (d) is where we type code
  15. 15.🏷️ HTML marks up text using ___. (a) wires (b) tags (c) keys (d) pixels
  16. 16.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  17. 17.📋 How many items does this list show?
    <ul>
      <li>Orange</li>
      <li>Grapes</li>
      <li>Jamun</li>
    </ul>
  18. 18.🔗 Where does this link open?
    <a href="news.html" target="_blank">Maths fun</a>
    (a) in the same tab (b) in a new tab
  19. 19.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="150">
  20. 20.🖼️ Which attribute of <img> tells which image to load? (a) src (b) height (c) width (d) alt
  21. 21.Which of these is true of a web server? (a) shows pages from the web (b) hosts websites online (c) has an address bar (d) turns HTML into a page
  22. 22.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Here is my best one. (b) Easy snacks (c) Class 7 Blog (d) index.html
  23. 23.🔢 In a basic web page file, which comes first: “</head>” or “<!DOCTYPE html>”? (a) </head> (b) <!DOCTYPE html>
  24. 24.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h2> or <h6>? (a) <h2> (b) <h6> (c) <h5> (d) <h4>
  25. 25.🔍 One closing tag is missing. Which one?
    <h1>The red kite</h1>
    <u>Our school trip</u>
    <i>My pets
    (a) </em> (b) </i> (c) </h1> (d) </u>
  26. 26.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h5> or <h4>? (a) <h5> (b) <h4> (c) <h6> (d) <h1>
  27. 27.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <p>Good morning!</p>
    <!-- <p>Rain today</p> -->
    <p>Cricket is fun.</p>
  28. 28.💬 How does an HTML comment start? (a) // (b) <!-- (c) # (d) /*
  29. 29.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <p>Fun facts</p>
    <p>I love mangoes.</p>
    <p>The red kite</p>
    <p>I love mangoes.</p>
  30. 30.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>My pets</p>
    <h4>Good morning!</h4>
    <h3>My pets</h3>
  31. 31.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h2> or <h1>? (a) <h3> (b) <h6> (c) <h2> (d) <h1>
  32. 32.True or false: a code editor opens web pages for us. (a) True (b) False
  33. 33.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  34. 34.True or false: <ul> lists things in any order. (a) False (b) True
  35. 35.🔗 Which attribute holds the address of a link? (a) href (b) alt (c) id (d) src
  36. 36.💬 Which text will NOT show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>My pets</p>
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
    (a) Our school trip (b) I love mangoes. (c) My pets (d) Cricket is fun.
  37. 37.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to show pictures (d) to leave notes
  38. 38.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h2> or <h4>? (a) <h2> (b) <h5> (c) <h3> (d) <h4>
  39. 39.📄 Can HTML on its own show paragraphs? (a) No (b) Yes
  40. 40.🔍 One closing tag is missing. Which one?
    <p>Rain today</p>
    <em>My best friend</em>
    <i>Our school trip
    (a) </h2> (b) </p> (c) </em> (d) </i>

Answer key

  1. <a>
  2. on the browser tab
  3. a web server
  4. <h2>
  5. False
  6. turns HTML into a page
  7. <li>
  8. No
  9. </h3>
  10. 3
  11. <
  12. moon.png
  13. shows pages from the web
  14. is where we type code
  15. tags
  16. in the head
  17. 3
  18. in a new tab
  19. 150
  20. src
  21. hosts websites online
  22. Class 7 Blog
  23. <!DOCTYPE html>
  24. <h6>
  25. </i>
  26. <h6>
  27. 2
  28. <!--
  29. 5
  30. 3
  31. <h6>
  32. False
  33. an opening tag
  34. True
  35. href
  36. I love mangoes.
  37. to leave notes
  38. <h5>
  39. Yes
  40. </i>

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