← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 399 · 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 is the least important heading? (a) <h3> (b) <h1> (c) <p> (d) <h6>
  2. 2.True or false: HTML on its own can make tables. (a) False (b) True
  3. 3.💬 Which text will NOT show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>The red kite</p>
    <p>Hello, world!</p>
    (a) I love mangoes. (b) The red kite (c) Hello, world!
  4. 4.💬 How does an HTML comment end? (a) --> (b) */ (c) >> (d) //
  5. 5.🏷️ Every HTML tag starts with which sign? (a) [ (b) { (c) < (d) (
  6. 6.🔗 Which address opens when you click this link?
    <a href="https://example.com">Contact us</a>
    (a) https://example.com (b) Contact us (c) maths.html (d) art.html
  7. 7.True or false: a web server saves our .html files. (a) False (b) True
  8. 8.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <p>I love mangoes.</p>
    <!-- <p>My pets</p> -->
  9. 9.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Class 7 Blog (b) Try this poha. (c) body (d) My drawings
  10. 10.True or false: in <img>, width shows if the image fails. (a) True (b) False
  11. 11.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>My pets</p>
    <p>Rain today</p>
  12. 12.📝 What does <p> make? (a) a table (b) a link (c) a paragraph (d) a picture
  13. 13.🌐 Which one opens web pages for us? (a) a code editor (b) a web server (c) a web browser
  14. 14.🔗 Where does this link open?
    <a href="contact.html">School news</a>
    (a) in a new tab (b) in the same tab
  15. 15.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <p>My best friend</p>
    <p>The red kite</p>
    <!-- <p>Rain today</p> -->
    (a) My best friend (b) The red kite (c) Hello, world! (d) Rain today
  16. 16.True or false: HTML on its own can add pictures to a page. (a) False (b) True
  17. 17.🔍 Which line is missing its closing tag?
    line 1: <h2>Good morning!
    line 2: <h1>My best friend</h1>
    line 3: <em>My pets</em>
    (a) line 1 (b) line 2 (c) line 3
  18. 18.🔍 Which line is missing its closing tag?
    line 1: <small>My pets</small>
    line 2: <em>Hello, world!</em>
    line 3: <i>Good morning!
    (a) line 3 (b) line 2 (c) line 1
  19. 19.True or false: <link rel="stylesheet"> goes in the head. (a) True (b) False
  20. 20.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  21. 21.📋 Which tag goes around each item of a list? (a) <li> (b) <ol> (c) <p> (d) <ul>
  22. 22.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h3> or <h4>? (a) <h4> (b) <h1> (c) <h2> (d) <h3>
  23. 23.Which of these is true of a web browser? (a) saves our .html files (b) turns HTML into a page (c) colours code to help us (d) stores a website’s files
  24. 24.🔍 One closing tag is missing. Which one?
    <i>My best friend
    <b>Fun facts</b>
    <h2>I love mangoes.</h2>
    (a) </b> (b) </u> (c) </i> (d) </h2>
  25. 25.📋 Does this list show bullets or numbers?
    <ol>
      <li>Mango</li>
      <li>Banana</li>
    </ol>
    (a) bullets (b) numbers
  26. 26.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
  27. 27.🖼️ Which attribute of <img> describes the picture? (a) alt (b) width (c) src (d) height
  28. 28.Which of these is true of a web server? (a) shows pages from the web (b) has an address bar (c) is where we type code (d) stores a website’s files
  29. 29.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <link about.html> (c) <a src="about.html"> (d) <a alt="about.html">
  30. 30.💬 How does an HTML comment start? (a) # (b) // (c) <!-- (d) /*
  31. 31.📋 What number does the browser show next to “Litchi”?
    <ol>
      <li>Grapes</li>
      <li>Litchi</li>
      <li>Jamun</li>
    </ol>
  32. 32.True or false: <ol> is an unordered list. (a) False (b) True
  33. 33.📄 Where does the text of <title> appear? (a) at the bottom (b) nowhere (c) on the browser tab (d) in a big heading
  34. 34.🔗 Which words do you click on?
    <a href="https://example.com">About us</a>
    (a) Contact us (b) https://example.com (c) href (d) About us
  35. 35.Which of these has a closing tag? (a) <br> (b) <hr> (c) <input> (d) <h1>
  36. 36.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h2> or <h5>? (a) <h4> (b) <h1> (c) <h5> (d) <h2>
  37. 37.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h3> or <h6>? (a) <h4> (b) <h2> (c) <h3> (d) <h6>
  38. 38.True or false: <img> goes in the head. (a) True (b) False
  39. 39.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Fun facts</p>
    <p>Cricket is fun.</p>
    <p>My best friend</p>
  40. 40.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <title> (c) <link rel="stylesheet"> (d) <img>

Answer key

  1. <h6>
  2. True
  3. I love mangoes.
  4. -->
  5. <
  6. https://example.com
  7. False
  8. 1
  9. My drawings
  10. False
  11. 1
  12. a paragraph
  13. a web browser
  14. in the same tab
  15. Rain today
  16. True
  17. line 1
  18. line 3
  19. True
  20. has a closing tag
  21. <li>
  22. <h1>
  23. turns HTML into a page
  24. </i>
  25. numbers
  26. 1
  27. alt
  28. stores a website’s files
  29. <a href="about.html">
  30. <!--
  31. 2
  32. False
  33. on the browser tab
  34. About us
  35. <h1>
  36. <h5>
  37. <h2>
  38. False
  39. 3
  40. <img>

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