← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 319 · 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 heading shows the SMALLEST text: <h4>, <h1>, <h6> or <h2>? (a) <h1> (b) <h2> (c) <h4> (d) <h6>
  2. 2.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
  3. 3.Which of these has a closing tag? (a) <meta> (b) <hr> (c) <br> (d) <h1>
  4. 4.🔍 One closing tag is missing. Which one?
    <h1>Fun facts
    <strong>I love mangoes.</strong>
    <h2>Good morning!</h2>
    (a) </strong> (b) </h2> (c) </h3> (d) </h1>
  5. 5.🔍 Which line is missing its closing tag?
    line 1: <small>Cricket is fun.</small>
    line 2: <u>My best friend
    line 3: <strong>I love mangoes.</strong>
    (a) line 1 (b) line 2 (c) line 3
  6. 6.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <!-- <p>Fun facts</p> -->
    <p>Cricket is fun.</p>
    <!-- <p>Rain today</p> -->
    <p>Hello, world!</p>
  7. 7.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>Hello, world!</p>
    <p>My best friend</p>
    (a) Rain today (b) Hello, world! (c) My best friend
  8. 8.🔗 Where does this link open?
    <a href="art.html">Take the quiz</a>
    (a) in a new tab (b) in the same tab
  9. 9.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h2>My pets</h2>
    <h2>Cricket is fun.</h2>
    <p>My pets</p>
  10. 10.📋 Which list tag shows bullet points? (a) <ol> (b) <li> (c) <ul>
  11. 11.🌐 Which one shows line numbers? (a) a code editor (b) a web server (c) a web browser
  12. 12.📝 What does <p> make? (a) a paragraph (b) a link (c) a picture (d) a table
  13. 13.🖼️ Which tag puts a picture on a page? (a) <img> (b) <pic> (c) <a> (d) <p>
  14. 14.🔗 Which address opens when you click this link?
    <a href="news.html">Maths fun</a>
    (a) Maths fun (b) news.html (c) quiz.html (d) games.html
  15. 15.🔗 Which words do you click on?
    <a href="news.html">Visit the site</a>
    (a) news.html (b) href (c) Visit the site (d) Maths fun
  16. 16.🏷️ Every HTML tag starts with which sign? (a) ( (b) { (c) [ (d) <
  17. 17.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h3> or <h2>? (a) <h6> (b) <h3> (c) <h2> (d) <h1>
  18. 18.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>Rain today</p>
    <h2>Our school trip</h2>
    <p>Good morning!</p>
    <h2>Good morning!</h2>
    <p>Cricket is fun.</p>
  19. 19.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h6> or <h4>? (a) <h2> (b) <h4> (c) <h6> (d) <h3>
  20. 20.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as a new line (c) as one space (d) as 5 spaces
  21. 21.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) editor (c) address (d) element
  22. 22.🔠 How many heading levels does HTML have? (a) 3 (b) 10 (c) 4 (d) 6
  23. 23.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h5> or <h6>? (a) <h6> (b) <h1> (c) <h5> (d) <h3>
  24. 24.True or false: <title> has a closing tag. (a) False (b) True
  25. 25.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Fun facts</p>
    <p>My pets</p>
  26. 26.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  27. 27.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h6>? (a) <h6> (b) <h2> (c) <h1> (d) <h4>
  28. 28.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  29. 29.🔗 Where does this link open?
    <a href="about.html">Contact us</a>
    (a) in a new tab (b) in the same tab
  30. 30.True or false: in <img>, alt tells which image to load. (a) False (b) True
  31. 31.🔗 What does target="_blank" do to a link? (a) makes it blank (b) opens it in a new tab (c) makes it bold (d) hides the link
  32. 32.💬 Which text will NOT show on the page?
    <!-- <p>My best friend</p> -->
    <p>Good morning!</p>
    <p>The red kite</p>
    <p>Cricket is fun.</p>
    (a) Cricket is fun. (b) The red kite (c) Good morning! (d) My best friend
  33. 33.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h1> or <h5>? (a) <h1> (b) <h5> (c) <h3> (d) <h4>
  34. 34.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Rain today</p>
    <p>The red kite</p>
    (a) Cricket is fun. (b) Rain today (c) The red kite (d) I love mangoes.
  35. 35.Which of these goes in the body? (a) <style> (b) <link rel="stylesheet"> (c) <title> (d) <h1>
  36. 36.🔍 Which is the odd one out? (a) answers page requests (b) hosts websites online (c) shows pages from the web (d) stores a website’s files
  37. 37.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>Fun facts</p>
    <h2>Our school trip</h2>
    <h3>Our school trip</h3>
  38. 38.📋 How many items does this list show?
    <ol>
      <li>Mango</li>
      <li>Guava</li>
      <li>Orange</li>
    </ol>
  39. 39.🔠 Which heading shows the BIGGEST text: <h4>, <h3>, <h5> or <h2>? (a) <h4> (b) <h2> (c) <h5> (d) <h3>
  40. 40.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) All about me (b) My Hobbies (c) index.html (d) Here is my best one.

Answer key

  1. <h6>
  2. in the body
  3. <h1>
  4. </h1>
  5. line 2
  6. 2
  7. Rain today
  8. in the same tab
  9. 3
  10. <ul>
  11. a code editor
  12. a paragraph
  13. <img>
  14. news.html
  15. Visit the site
  16. <
  17. <h6>
  18. 4
  19. <h2>
  20. as one space
  21. element
  22. 6
  23. <h1>
  24. True
  25. 2
  26. a closing tag
  27. <h1>
  28. No
  29. in the same tab
  30. False
  31. opens it in a new tab
  32. My best friend
  33. <h1>
  34. I love mangoes.
  35. <h1>
  36. shows pages from the web
  37. 3
  38. 3
  39. <h2>
  40. My Hobbies

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