← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 136 · 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 paragraphs does this code make?
    <p>My pets</p>
    <p>I love mangoes.</p>
    <p>My best friend</p>
  2. 2.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  3. 3.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Roses are red<br>Sky is blue<br>Rivers flow</p>
  4. 4.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <p>Our school trip</p>
    <!-- <p>Fun facts</p> -->
  5. 5.Which of these is an empty tag? (a) <title> (b) <input> (c) <b> (d) <p>
  6. 6.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 10 (c) 6 (d) 3
  7. 7.💾 A web page file usually ends with which extension? (a) .png (b) .mp3 (c) .txt (d) .html
  8. 8.Which of these is true of a web server? (a) hosts websites online (b) shows line numbers (c) turns HTML into a page (d) opens web pages for us
  9. 9.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>Cricket is fun.</p>
    <!-- <p>Our school trip</p> -->
  10. 10.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Line (c) Link (d) Language
  11. 11.🔗 Which address opens when you click this link?
    <a href="news.html">Contact us</a>
    (a) games.html (b) quiz.html (c) news.html (d) Contact us
  12. 12.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>My best friend</p>
    <p>Our school trip</p>
    (a) Our school trip (b) My best friend (c) Hello, world!
  13. 13.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a alt="about.html"> (c) <link about.html> (d) <a href="about.html">
  14. 14.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
    <p>My pets</p>
    <h2>The red kite</h2>
    <p>The red kite</p>
  15. 15.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h3>My best friend</h3>
    <p>Cricket is fun.</p>
    <h2>Our school trip</h2>
  16. 16.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) src (c) width (d) alt
  17. 17.True or false: <li> is an ordered list. (a) True (b) False
  18. 18.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Birds sing</p>
  19. 19.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="300">
  20. 20.💬 Which text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>I love mangoes.</p>
    <p>Rain today</p>
    <p>Cricket is fun.</p>
    (a) Rain today (b) I love mangoes. (c) My pets (d) Cricket is fun.
  21. 21.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h2>I love mangoes.</h2>
    <p>My best friend</p>
    <h4>Good morning!</h4>
    <p>My pets</p>
  22. 22.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <p>Our school trip</p>
    <p>Hello, world!</p>
    <h2>Hello, world!</h2>
    <p>The red kite</p>
    <p>My pets</p>
  23. 23.🔗 Which attribute holds the address of a link? (a) href (b) src (c) id (d) alt
  24. 24.💬 How does an HTML comment start? (a) // (b) # (c) /* (d) <!--
  25. 25.🔍 One closing tag is missing. Which one?
    <b>Hello, world!</b>
    <i>Our school trip
    <h3>The red kite</h3>
    (a) </p> (b) </b> (c) </i> (d) </h3>
  26. 26.📋 Which list tag is one item of a list? (a) <ul> (b) <li> (c) <ol>
  27. 27.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>My best friend</p> -->
    <!-- <p>Good morning!</p> -->
    <p>Fun facts</p>
    <!-- <p>The red kite</p> -->
  28. 28.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <!-- <p>Rain today</p> -->
    <!-- <p>Our school trip</p> -->
  29. 29.🔗 Where does this link open?
    <a href="about.html">School news</a>
    (a) in a new tab (b) in the same tab
  30. 30.True or false: a web server is where we type code. (a) True (b) False
  31. 31.True or false: <b> is an empty tag. (a) True (b) False
  32. 32.Which of these is true of a web browser? (a) hosts websites online (b) shows line numbers (c) stores a website’s files (d) opens web pages for us
  33. 33.True or false: <meta charset="utf-8"> goes in the head. (a) True (b) False
  34. 34.True or false: HTML on its own can add pictures to a page. (a) True (b) False
  35. 35.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Papaya</li>
      <li>Banana</li>
      <li>Guava</li>
      <li>Grapes</li>
      <li>Mango</li>
    </ol>
  36. 36.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <p>The red kite</p>
    <!-- <p>Fun facts</p> -->
    <!-- <p>Hello, world!</p> -->
  37. 37.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Rivers flow<br>Kites fly high<br>Roses are red</p>
  38. 38.🔍 One closing tag is missing. Which one?
    <h1>I love mangoes.
    <p>Hello, world!</p>
    <b>Our school trip</b>
    (a) </p> (b) </strong> (c) </h1> (d) </b>
  39. 39.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <a> (d) <img>
  40. 40.True or false: <title> goes in the head. (a) False (b) True

Answer key

  1. 3
  2. Yes
  3. 4
  4. 2
  5. <input>
  6. 1
  7. .html
  8. hosts websites online
  9. 1
  10. Language
  11. news.html
  12. Hello, world!
  13. <a href="about.html">
  14. 4
  15. 3
  16. alt
  17. False
  18. 2
  19. 300
  20. My pets
  21. 3
  22. 5
  23. href
  24. <!--
  25. </i>
  26. <li>
  27. 1
  28. 1
  29. in the same tab
  30. False
  31. False
  32. opens web pages for us
  33. True
  34. True
  35. 6
  36. 1
  37. 4
  38. </h1>
  39. <a>
  40. True

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