← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 76 · 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.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Rain today</p>
    <h3>The red kite</h3>
  2. 2.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) width (c) alt (d) height
  3. 3.🔗 Where does this link open?
    <a href="maths.html">Maths fun</a>
    (a) in a new tab (b) in the same tab
  4. 4.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="150">
    (a) fort.jpg (b) An old fort (c) tiger.jpg (d) kite.png
  5. 5.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Sky is blue<br>Birds sing</p>
  6. 6.True or false: HTML on its own cannot make bullet lists. (a) False (b) True
  7. 7.🖼️ Which attribute of <img> tells which image to load? (a) src (b) alt (c) height (d) width
  8. 8.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Mars is red. (b) body (c) My Hobbies (d) Welcome!
  9. 9.🔍 Which line is missing its closing tag?
    line 1: <small>Good morning!
    line 2: <strong>I love mangoes.</strong>
    line 3: <p>The red kite</p>
    (a) line 2 (b) line 1 (c) line 3
  10. 10.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  11. 11.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  12. 12.🔢 In a basic web page file, which comes first: “<body>” or “<head>”? (a) <body> (b) <head>
  13. 13.Which of these is true of a web browser? (a) stores a website’s files (b) shows line numbers (c) shows pages from the web (d) answers page requests
  14. 14.Which of these is true of a web browser? (a) shows line numbers (b) turns HTML into a page (c) saves our .html files (d) hosts websites online
  15. 15.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Machine (c) Markup (d) Mouse
  16. 16.🔍 Which line is missing its closing tag?
    line 1: <strong>Our school trip</strong>
    line 2: <h1>The red kite</h1>
    line 3: <h2>Cricket is fun.
    (a) line 1 (b) line 3 (c) line 2
  17. 17.🔗 Where does this link open?
    <a href="https://example.com" target="_blank">Visit the site</a>
    (a) in the same tab (b) in a new tab
  18. 18.🔗 Where does this link open?
    <a href="art.html" target="_blank">Play games</a>
    (a) in the same tab (b) in a new tab
  19. 19.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Rain today</p>
    <!-- <p>Good morning!</p> -->
    <p>The red kite</p>
  20. 20.🔍 Which is the odd one out? (a) answers page requests (b) hosts websites online (c) stores a website’s files (d) saves our .html files
  21. 21.True or false: in <img>, src names the picture file. (a) True (b) False
  22. 22.🏷️ Every HTML tag starts with which sign? (a) [ (b) < (c) ( (d) {
  23. 23.🔍 Which is the odd one out? (a) turns HTML into a page (b) shows pages from the web (c) shows line numbers (d) opens web pages for us
  24. 24.📝 What does <p> make? (a) a picture (b) a link (c) a table (d) a paragraph
  25. 25.🔗 Which attribute holds the address of a link? (a) id (b) src (c) alt (d) href
  26. 26.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h1> or <h3>? (a) <h3> (b) <h1> (c) <h5> (d) <h4>
  27. 27.💬 Which text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>I love mangoes.</p>
    <p>My best friend</p>
    (a) My best friend (b) My pets (c) I love mangoes.
  28. 28.🔗 Where does this link open?
    <a href="news.html" target="_blank">Visit the site</a>
    (a) in a new tab (b) in the same tab
  29. 29.Which of these is true of a web server? (a) turns HTML into a page (b) has an address bar (c) opens web pages for us (d) answers page requests
  30. 30.🔗 Which words do you click on?
    <a href="contact.html">About us</a>
    (a) contact.html (b) About us (c) Contact us (d) href
  31. 31.🔗 Where does this link open?
    <a href="news.html" target="_blank">Take the quiz</a>
    (a) in a new tab (b) in the same tab
  32. 32.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <!-- <p>I love mangoes.</p> -->
    <p>Good morning!</p>
    <p>Hello, world!</p>
  33. 33.📋 Does this list show bullets or numbers?
    <ol>
      <li>Papaya</li>
      <li>Grapes</li>
      <li>Jamun</li>
    </ol>
    (a) numbers (b) bullets
  34. 34.💬 How does an HTML comment end? (a) */ (b) // (c) >> (d) -->
  35. 35.True or false: in <img>, alt sets how tall it is. (a) False (b) True
  36. 36.Which of these goes in the head? (a) <h1> (b) <img> (c) <meta charset="utf-8"> (d) <table>
  37. 37.Which of these is true of a code editor? (a) colours code to help us (b) shows pages from the web (c) opens web pages for us (d) stores a website’s files
  38. 38.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h5> or <h4>? (a) <h5> (b) <h4> (c) <h3> (d) <h2>
  39. 39.True or false: <title> goes in the head. (a) False (b) True
  40. 40.💬 Does the browser show comments on the page? (a) Yes (b) No

Answer key

  1. 2
  2. alt
  3. in the same tab
  4. fort.jpg
  5. 3
  6. False
  7. src
  8. Welcome!
  9. line 1
  10. Yes
  11. a closing tag
  12. <head>
  13. shows pages from the web
  14. turns HTML into a page
  15. Markup
  16. line 3
  17. in a new tab
  18. in a new tab
  19. 2
  20. saves our .html files
  21. True
  22. <
  23. shows line numbers
  24. a paragraph
  25. href
  26. <h1>
  27. My pets
  28. in a new tab
  29. answers page requests
  30. About us
  31. in a new tab
  32. 2
  33. numbers
  34. -->
  35. False
  36. <meta charset="utf-8">
  37. colours code to help us
  38. <h2>
  39. True
  40. No

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