← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 336 · 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 <h1> headings should a page usually have? (a) 1 (b) 6 (c) 3 (d) 10
  2. 2.True or false: <li> is an empty tag. (a) True (b) False
  3. 3.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  4. 4.🔠 Are headings shown in bold by default? (a) No (b) Yes
  5. 5.Which of these is a closing tag? (a) <h1> (b) </h1> (c) <p> (d) <body>
  6. 6.🔍 Which line is missing its closing tag?
    line 1: <i>Fun facts</i>
    line 2: <h2>I love mangoes.
    line 3: <h1>Good morning!</h1>
    (a) line 2 (b) line 3 (c) line 1
  7. 7.Which of these is true of a web server? (a) opens web pages for us (b) turns HTML into a page (c) hosts websites online (d) saves our .html files
  8. 8.📋 Which tag goes around each item of a list? (a) <p> (b) <li> (c) <ol> (d) <ul>
  9. 9.🏷️ Which is the closing tag for <u>? (a) <u/> (b) </u> (c) <\u> (d) <u>
  10. 10.🔍 Which line is missing its closing tag?
    line 1: <small>Good morning!</small>
    line 2: <h1>My best friend</h1>
    line 3: <h2>Rain today
    (a) line 3 (b) line 1 (c) line 2
  11. 11.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <h2>Fun facts</h2>
    <p>Good morning!</p>
    <p>Fun facts</p>
  12. 12.🏷️ Which is the closing tag for <i>? (a) </i> (b) <\i> (c) <i/> (d) <i>
  13. 13.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Hello, world!</p> -->
    <p>Our school trip</p>
    <p>My pets</p>
  14. 14.📄 Which part holds everything you see on the page? (a) the title (b) the doctype (c) the body (d) the head
  15. 15.True or false: in <img>, height tells which image to load. (a) True (b) False
  16. 16.📋 Which list tag is one item of a list? (a) <ol> (b) <li> (c) <ul>
  17. 17.📄 Where does the text of <title> appear? (a) nowhere (b) at the bottom (c) in a big heading (d) on the browser tab
  18. 18.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="250">
    (a) An old fort (b) kite.png (c) tiger.jpg (d) fort.jpg
  19. 19.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <!-- <p>My best friend</p> -->
    <p>Good morning!</p>
    (a) I love mangoes. (b) My best friend (c) Good morning!
  20. 20.True or false: HTML on its own cannot make tables. (a) False (b) True
  21. 21.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="50">
    (a) moon.png (b) dog.jpg (c) cake.jpg (d) Birthday cake
  22. 22.🔗 Which address opens when you click this link?
    <a href="games.html">Take the quiz</a>
    (a) Take the quiz (b) contact.html (c) about.html (d) games.html
  23. 23.🔗 Which attribute holds the address of a link? (a) src (b) id (c) href (d) alt
  24. 24.True or false: <br> has a closing tag. (a) False (b) True
  25. 25.📋 How many items does this list show?
    <ol>
      <li>Orange</li>
      <li>Mango</li>
      <li>Papaya</li>
    </ol>
  26. 26.🔗 Where does this link open?
    <a href="https://example.com" target="_blank">Play games</a>
    (a) in a new tab (b) in the same tab
  27. 27.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  28. 28.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) body (b) Mars is red. (c) Art Gallery (d) Welcome!
  29. 29.🔍 Which line is missing its closing tag?
    line 1: <h2>Good morning!</h2>
    line 2: <em>The red kite</em>
    line 3: <i>My pets
    (a) line 3 (b) line 1 (c) line 2
  30. 30.🏷️ Every HTML tag starts with which sign? (a) { (b) [ (c) < (d) (
  31. 31.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  32. 32.🔗 Where does this link open?
    <a href="news.html">Maths fun</a>
    (a) in the same tab (b) in a new tab
  33. 33.📄 Can HTML on its own run a game loop? (a) No (b) Yes
  34. 34.True or false: in <img>, src sets how tall it is. (a) False (b) True
  35. 35.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h2>The red kite</h2>
    <h4>Rain today</h4>
    <h3>Good morning!</h3>
    <h2>Good morning!</h2>
  36. 36.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Roses are red<br>Stars shine<br>Rivers flow</p>
  37. 37.Which of these has a closing tag? (a) <meta> (b) <b> (c) <hr> (d) <input>
  38. 38.🔠 Which tag is the least important heading? (a) <h1> (b) <p> (c) <h6> (d) <h3>
  39. 39.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <p>Good morning!</p>
    <!-- <p>The red kite</p> -->
    <p>I love mangoes.</p>
  40. 40.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) alt (c) height (d) width

Answer key

  1. 1
  2. False
  3. Yes
  4. Yes
  5. </h1>
  6. line 2
  7. hosts websites online
  8. <li>
  9. </u>
  10. line 3
  11. 3
  12. </i>
  13. 3
  14. the body
  15. False
  16. <li>
  17. on the browser tab
  18. fort.jpg
  19. My best friend
  20. False
  21. cake.jpg
  22. games.html
  23. href
  24. False
  25. 3
  26. in a new tab
  27. Yes
  28. Welcome!
  29. line 3
  30. <
  31. an opening tag
  32. in the same tab
  33. No
  34. False
  35. 5
  36. 4
  37. <b>
  38. <h6>
  39. 3
  40. alt

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