← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 955 · 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 address opens when you click this link?
    <a href="news.html">Play games</a>
    (a) games.html (b) news.html (c) quiz.html (d) Play games
  2. 2.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) height (c) width (d) src
  3. 3.🔗 Which words do you click on?
    <a href="about.html">About us</a>
    (a) About us (b) href (c) about.html (d) Contact us
  4. 4.🔠 How many heading levels does HTML have? (a) 10 (b) 4 (c) 6 (d) 3
  5. 5.Which of these is true of a web server? (a) sends pages over the net (b) turns HTML into a page (c) opens web pages for us (d) shows line numbers
  6. 6.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) alt (c) src (d) width
  7. 7.💬 How does an HTML comment start? (a) # (b) <!-- (c) // (d) /*
  8. 8.🏷️ Which is the closing tag for <u>? (a) </u> (b) <\u> (c) <u> (d) <u/>
  9. 9.📋 How many items does this list show?
    <ul>
      <li>Banana</li>
      <li>Guava</li>
      <li>Grapes</li>
      <li>Jamun</li>
    </ul>
  10. 10.📋 Does this list show bullets or numbers?
    <ul>
      <li>Mango</li>
      <li>Jamun</li>
    </ul>
    (a) bullets (b) numbers
  11. 11.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="250">
  12. 12.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h6> or <h2>? (a) <h2> (b) <h1> (c) <h6> (d) <h5>
  13. 13.🔗 Which words do you click on?
    <a href="contact.html">About us</a>
    (a) contact.html (b) Contact us (c) href (d) About us
  14. 14.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <img> (d) <a>
  15. 15.🔗 Which address opens when you click this link?
    <a href="contact.html">Play games</a>
    (a) Play games (b) maths.html (c) contact.html (d) https://example.com
  16. 16.🔍 Which is the odd one out? (a) saves our .html files (b) colours code to help us (c) stores a website’s files (d) shows line numbers
  17. 17.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <!-- <p>Our school trip</p> -->
    <p>I love mangoes.</p>
    <!-- <p>My best friend</p> -->
    <!-- <p>The red kite</p> -->
  18. 18.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <!-- <p>My best friend</p> -->
    <p>My pets</p>
    <p>Hello, world!</p>
  19. 19.💬 Which text will NOT show on the page?
    <!-- <p>The red kite</p> -->
    <p>Hello, world!</p>
    <p>My best friend</p>
    (a) The red kite (b) My best friend (c) Hello, world!
  20. 20.True or false: <h1> is an empty tag. (a) True (b) False
  21. 21.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h3> or <h4>? (a) <h4> (b) <h3> (c) <h1> (d) <h5>
  22. 22.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h5> or <h3>? (a) <h1> (b) <h5> (c) <h3> (d) <h2>
  23. 23.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  24. 24.🔍 Which line is missing its closing tag?
    line 1: <i>Cricket is fun.</i>
    line 2: <strong>Fun facts</strong>
    line 3: <h1>I love mangoes.
    (a) line 2 (b) line 3 (c) line 1
  25. 25.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <!-- <p>My best friend</p> -->
    <p>Rain today</p>
  26. 26.Which of these is true of a web server? (a) stores a website’s files (b) shows line numbers (c) shows pages from the web (d) turns HTML into a page
  27. 27.🏷️ Every HTML tag starts with which sign? (a) < (b) { (c) ( (d) [
  28. 28.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h3> or <h4>? (a) <h1> (b) <h4> (c) <h2> (d) <h3>
  29. 29.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="100">
    (a) moon.png (b) width (c) Our school bus (d) The full moon
  30. 30.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Papaya</li>
    </ul>
    (a) bullets (b) numbers
  31. 31.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) <body> (c) </html> (d) </body>
  32. 32.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Roses are red<br>Birds sing</p>
  33. 33.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h2>My pets</h2>
    <h4>I love mangoes.</h4>
  34. 34.📄 Can HTML on its own make headings? (a) Yes (b) No
  35. 35.💬 Which text will NOT show on the page?
    <!-- <p>My best friend</p> -->
    <p>Good morning!</p>
    <p>My pets</p>
    (a) My best friend (b) Good morning! (c) My pets
  36. 36.🔗 Where does this link open?
    <a href="contact.html" target="_blank">School news</a>
    (a) in a new tab (b) in the same tab
  37. 37.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h1> (c) <p> (d) <h6>
  38. 38.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>Hello, world!</p>
    <p>Good morning!</p>
    <p>Our school trip</p>
  39. 39.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h3> or <h4>? (a) <h3> (b) <h4> (c) <h5> (d) <h2>
  40. 40.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No

Answer key

  1. news.html
  2. width
  3. About us
  4. 6
  5. sends pages over the net
  6. alt
  7. <!--
  8. </u>
  9. 4
  10. bullets
  11. 250
  12. <h1>
  13. About us
  14. <img>
  15. contact.html
  16. stores a website’s files
  17. 1
  18. 2
  19. The red kite
  20. False
  21. <h5>
  22. <h1>
  23. has a closing tag
  24. line 3
  25. 1
  26. stores a website’s files
  27. <
  28. <h1>
  29. The full moon
  30. bullets
  31. <!DOCTYPE html>
  32. 3
  33. 3
  34. Yes
  35. My best friend
  36. in a new tab
  37. <h1>
  38. 4
  39. <h2>
  40. Yes

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