← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 843 · 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 picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="300">
    (a) moon.png (b) A happy dog (c) bus.jpg (d) dog.jpg
  2. 2.🏷️ Which is the closing tag for <small>? (a) </small> (b) <small/> (c) <small> (d) <\small>
  3. 3.📋 Which list tag goes inside ul or ol? (a) <ol> (b) <ul> (c) <li>
  4. 4.True or false: <meta charset="utf-8"> goes in the body. (a) False (b) True
  5. 5.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as 5 spaces (c) as one space (d) as a dot
  6. 6.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  7. 7.🔍 Which is the odd one out? (a) turns HTML into a page (b) has an address bar (c) opens web pages for us (d) colours code to help us
  8. 8.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h3> or <h4>? (a) <h3> (b) <h4> (c) <h5> (d) <h6>
  9. 9.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <h2>Hello, world!</h2>
    <p>Fun facts</p>
    <p>The red kite</p>
  10. 10.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) address (c) attribute (d) editor
  11. 11.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  12. 12.Which of these is true of a code editor? (a) shows line numbers (b) opens web pages for us (c) turns HTML into a page (d) shows pages from the web
  13. 13.🔗 What does target="_blank" do to a link? (a) makes it bold (b) opens it in a new tab (c) makes it blank (d) hides the link
  14. 14.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h4> or <h5>? (a) <h6> (b) <h4> (c) <h1> (d) <h5>
  15. 15.🔠 Are headings shown in bold by default? (a) Yes (b) No
  16. 16.🔗 Which words do you click on?
    <a href="about.html">Contact us</a>
    (a) Visit the site (b) about.html (c) href (d) Contact us
  17. 17.🔗 Where does this link open?
    <a href="contact.html">Take the quiz</a>
    (a) in the same tab (b) in a new tab
  18. 18.📝 What do we need to write HTML? (a) a microphone (b) a plain text editor (c) a printer (d) a paintbrush
  19. 19.📋 How many items does this list show?
    <ol>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Guava</li>
    </ol>
  20. 20.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>My best friend</p>
    <h2>My pets</h2>
    <p>Good morning!</p>
    <h2>My best friend</h2>
    <p>My best friend</p>
  21. 21.🔢 In a basic web page file, which comes first: “<head>” or “</head>”? (a) </head> (b) <head>
  22. 22.🔗 Which words do you click on?
    <a href="quiz.html">Maths fun</a>
    (a) href (b) quiz.html (c) Maths fun (d) Art corner
  23. 23.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <p>My pets</p>
    <!-- <p>Rain today</p> -->
    <p>Our school trip</p>
    (a) Rain today (b) My best friend (c) Our school trip (d) My pets
  24. 24.Which of these is an opening tag? (a) </p> (b) <p> (c) </body> (d) </b>
  25. 25.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  26. 26.💬 How does an HTML comment start? (a) # (b) <!-- (c) /* (d) //
  27. 27.True or false: a code editor is where we type code. (a) False (b) True
  28. 28.Which of these goes in the head? (a) <ul> (b) <link rel="stylesheet"> (c) <img> (d) <h1>
  29. 29.🔍 Which line is missing its closing tag?
    line 1: <u>I love mangoes.
    line 2: <i>Rain today</i>
    line 3: <strong>Hello, world!</strong>
    (a) line 1 (b) line 3 (c) line 2
  30. 30.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Fun facts</p> -->
    <p>Cricket is fun.</p>
  31. 31.🔗 Which address opens when you click this link?
    <a href="games.html">Visit the site</a>
    (a) contact.html (b) about.html (c) Visit the site (d) games.html
  32. 32.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  33. 33.Which of these goes in the head? (a) <p> (b) <style> (c) <ul> (d) <table>
  34. 34.🔗 Where does this link open?
    <a href="about.html" target="_blank">Play games</a>
    (a) in the same tab (b) in a new tab
  35. 35.💬 How does an HTML comment end? (a) >> (b) // (c) --> (d) */
  36. 36.🔢 In a basic web page file, which comes first: “</head>” or “</body>”? (a) </body> (b) </head>
  37. 37.True or false: HTML on its own can make tables. (a) True (b) False
  38. 38.📋 Does this list show bullets or numbers?
    <ol>
      <li>Jamun</li>
      <li>Banana</li>
    </ol>
    (a) bullets (b) numbers
  39. 39.📋 Which list tag lists steps in order? (a) <ol> (b) <ul> (c) <li>
  40. 40.🔍 One closing tag is missing. Which one?
    <u>Good morning!
    <h1>Hello, world!</h1>
    <h2>The red kite</h2>
    (a) </h3> (b) </u> (c) </h2> (d) </h1>

Answer key

  1. dog.jpg
  2. </small>
  3. <li>
  4. False
  5. as one space
  6. No
  7. colours code to help us
  8. <h3>
  9. 3
  10. element
  11. Yes
  12. shows line numbers
  13. opens it in a new tab
  14. <h6>
  15. Yes
  16. Contact us
  17. in the same tab
  18. a plain text editor
  19. 5
  20. 4
  21. <head>
  22. Maths fun
  23. Rain today
  24. <p>
  25. a closing tag
  26. <!--
  27. True
  28. <link rel="stylesheet">
  29. line 1
  30. 1
  31. games.html
  32. has a closing tag
  33. <style>
  34. in a new tab
  35. -->
  36. </head>
  37. True
  38. numbers
  39. <ol>
  40. </u>

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