← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 622 · 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 of these goes in the head? (a) <link rel="stylesheet"> (b) <p> (c) <img> (d) <h1>
  2. 2.🔗 Which words do you click on?
    <a href="https://example.com">Contact us</a>
    (a) https://example.com (b) Contact us (c) Visit the site (d) href
  3. 3.📄 Can HTML on its own make links to pages? (a) Yes (b) No
  4. 4.Which of these is a closing tag? (a) <p> (b) <body> (c) </li> (d) <h1>
  5. 5.📋 How many items does this list show?
    <ul>
      <li>Litchi</li>
      <li>Orange</li>
      <li>Jamun</li>
    </ul>
  6. 6.🔗 Which tag makes a clickable link? (a) <link> (b) <a> (c) <p> (d) <img>
  7. 7.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h3> or <h6>? (a) <h6> (b) <h5> (c) <h2> (d) <h3>
  8. 8.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>Good morning!</p>
    <h2>Cricket is fun.</h2>
  9. 9.🔗 Which address opens when you click this link?
    <a href="maths.html">Visit the site</a>
    (a) Visit the site (b) news.html (c) art.html (d) maths.html
  10. 10.Which of these is true of a web browser? (a) is where we type code (b) stores a website’s files (c) has an address bar (d) colours code to help us
  11. 11.🔍 One closing tag is missing. Which one?
    <h1>The red kite
    <u>My pets</u>
    <i>Good morning!</i>
    (a) </i> (b) </u> (c) </small> (d) </h1>
  12. 12.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h4> or <h3>? (a) <h5> (b) <h4> (c) <h3> (d) <h6>
  13. 13.📝 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
  14. 14.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Cricket Club (b) Thanks for visiting. (c) body (d) My drawings
  15. 15.💬 How does an HTML comment start? (a) # (b) /* (c) // (d) <!--
  16. 16.🔗 Where does this link open?
    <a href="maths.html" target="_blank">Visit the site</a>
    (a) in a new tab (b) in the same tab
  17. 17.🔢 In a basic web page file, which comes first: “<head>” or “<html>”? (a) <head> (b) <html>
  18. 18.🔍 Which is the odd one out? (a) has an address bar (b) stores a website’s files (c) answers page requests (d) hosts websites online
  19. 19.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <p>I love mangoes.</p>
    <p>Our school trip</p>
    <!-- <p>Good morning!</p> -->
    <p>Cricket is fun.</p>
  20. 20.🔗 Which code links to about.html? (a) <link about.html> (b) <a src="about.html"> (c) <a alt="about.html"> (d) <a href="about.html">
  21. 21.🔗 Where does this link open?
    <a href="games.html">School news</a>
    (a) in the same tab (b) in a new tab
  22. 22.💬 Which text will NOT show on the page?
    <!-- <p>Our school trip</p> -->
    <p>My best friend</p>
    <p>My pets</p>
    (a) My pets (b) Our school trip (c) My best friend
  23. 23.🔗 Which words do you click on?
    <a href="https://example.com">Take the quiz</a>
    (a) Play games (b) href (c) Take the quiz (d) https://example.com
  24. 24.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) height (c) alt (d) width
  25. 25.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) attribute (c) address (d) element
  26. 26.🌐 Which one is where we type code? (a) a web server (b) a web browser (c) a code editor
  27. 27.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a slash / (c) a hash # (d) a dot .
  28. 28.💬 Why do coders write comments? (a) to make links (b) to add colour (c) to show pictures (d) to leave notes
  29. 29.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <br> (c) <p> (d) <h1>
  30. 30.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <p>The red kite</p>
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
    <p>Rain today</p>
  31. 31.🌐 Which one shows pages from the web? (a) a code editor (b) a web server (c) a web browser
  32. 32.🧱 HTML gives a web page its ___. (a) sound (b) speed (c) structure (d) colours
  33. 33.💬 Does the browser show comments on the page? (a) Yes (b) No
  34. 34.📋 Does this list show bullets or numbers?
    <ol>
      <li>Mango</li>
      <li>Grapes</li>
    </ol>
    (a) bullets (b) numbers
  35. 35.True or false: <ol> is one item of a list. (a) True (b) False
  36. 36.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  37. 37.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>My best friend</p>
    <!-- <p>Rain today</p> -->
    <!-- <p>Cricket is fun.</p> -->
  38. 38.📋 What number does the browser show next to “Papaya”?
    <ol start="2">
      <li>Jamun</li>
      <li>Mango</li>
      <li>Banana</li>
      <li>Papaya</li>
    </ol>
  39. 39.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ol> (c) <ul>
  40. 40.📛 In <a href="x.html">, what is href? (a) an element name (b) a comment (c) an attribute (d) a closing tag

Answer key

  1. <link rel="stylesheet">
  2. Contact us
  3. Yes
  4. </li>
  5. 3
  6. <a>
  7. <h2>
  8. 2
  9. maths.html
  10. has an address bar
  11. </h1>
  12. <h3>
  13. as one space
  14. My drawings
  15. <!--
  16. in a new tab
  17. <html>
  18. has an address bar
  19. 4
  20. <a href="about.html">
  21. in the same tab
  22. Our school trip
  23. Take the quiz
  24. height
  25. element
  26. a code editor
  27. a slash /
  28. to leave notes
  29. <h1>
  30. 5
  31. a web browser
  32. structure
  33. No
  34. numbers
  35. False
  36. an opening tag
  37. 1
  38. 5
  39. <ol>
  40. an attribute

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