← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 177 · 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>Rain today</p>
    <h2>Hello, world!</h2>
    <p>I love mangoes.</p>
    <p>I love mangoes.</p>
  2. 2.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  3. 3.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <p>I love mangoes.</p>
    <p>My best friend</p>
    <p>Fun facts</p>
    <p>My pets</p>
  4. 4.🔍 Which is the odd one out? (a) colours code to help us (b) is where we type code (c) has an address bar (d) shows line numbers
  5. 5.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>Hello, world!</p>
    <!-- <p>The red kite</p> -->
  6. 6.🌍 Which program shows a web page to us? (a) a calculator (b) a music player (c) a web browser (d) a paint program
  7. 7.🔗 Which words do you click on?
    <a href="games.html">Visit the site</a>
    (a) href (b) games.html (c) Visit the site (d) Maths fun
  8. 8.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  9. 9.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h3> or <h5>? (a) <h5> (b) <h3> (c) <h1> (d) <h4>
  10. 10.True or false: <li> shows bullet points. (a) True (b) False
  11. 11.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="400">
    (a) A happy dog (b) moon.png (c) bus.jpg (d) dog.jpg
  12. 12.Which of these is a closing tag? (a) <title> (b) <h1> (c) <p> (d) </h1>
  13. 13.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Birds sing</p>
  14. 14.🔗 Which words do you click on?
    <a href="about.html">Art corner</a>
    (a) about.html (b) href (c) Art corner (d) School news
  15. 15.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>Fun facts</p>
    <h2>The red kite</h2>
    <h2>I love mangoes.</h2>
    <h2>Hello, world!</h2>
    <h2>Hello, world!</h2>
  16. 16.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <p>Cricket is fun.</p>
    <p>Hello, world!</p>
    <p>The red kite</p>
  17. 17.🔗 Which attribute holds the address of a link? (a) id (b) src (c) href (d) alt
  18. 18.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h5> or <h4>? (a) <h6> (b) <h1> (c) <h5> (d) <h4>
  19. 19.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>Hello, world!</p>
    <p>Our school trip</p>
    <p>I love mangoes.</p>
  20. 20.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <p>Hello, world!</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>I love mangoes.</p>
    <!-- <p>Good morning!</p> -->
  21. 21.True or false: <li> is an empty tag. (a) False (b) True
  22. 22.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <h2>Good morning!</h2>
    <p>My pets</p>
    <p>Our school trip</p>
  23. 23.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Here is my best one. (b) body (c) Easy snacks (d) Art Gallery
  24. 24.🔗 Where does this link open?
    <a href="games.html" target="_blank">About us</a>
    (a) in the same tab (b) in a new tab
  25. 25.🖼️ Which tag puts a picture on a page? (a) <img> (b) <pic> (c) <a> (d) <p>
  26. 26.True or false: <ul> is an unordered list. (a) True (b) False
  27. 27.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h6> or <h3>? (a) <h6> (b) <h1> (c) <h3> (d) <h5>
  28. 28.📋 Which tag goes around each item of a list? (a) <ol> (b) <p> (c) <li> (d) <ul>
  29. 29.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="400">
    (a) width (b) An old fort (c) bus.jpg (d) Our school bus
  30. 30.True or false: <ul> has a closing tag. (a) True (b) False
  31. 31.🏷️ Which is the closing tag for <small>? (a) </small> (b) <small/> (c) <small> (d) <\small>
  32. 32.🔢 In a basic web page file, which comes LAST? (a) <body> (b) </html> (c) </body> (d) <!DOCTYPE html>
  33. 33.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h2>Good morning!</h2>
    <p>Hello, world!</p>
    <p>Our school trip</p>
    <p>Rain today</p>
  34. 34.🔍 Which line is missing its closing tag?
    line 1: <h3>Cricket is fun.</h3>
    line 2: <em>My pets</em>
    line 3: <strong>Rain today
    (a) line 2 (b) line 3 (c) line 1
  35. 35.📄 Can HTML on its own make tables? (a) Yes (b) No
  36. 36.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) I like to read. (b) body (c) Planets (d) Cricket Club
  37. 37.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  38. 38.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <h2>Fun facts</h2>
    <h2>Hello, world!</h2>
    <p>My best friend</p>
    <p>Fun facts</p>
    <p>My best friend</p>
  39. 39.🔍 One closing tag is missing. Which one?
    <h2>My pets
    <b>I love mangoes.</b>
    <strong>Hello, world!</strong>
    (a) </b> (b) </h2> (c) </strong> (d) </i>
  40. 40.📛 In <a href="x.html">, what is href? (a) an attribute (b) a closing tag (c) a comment (d) an element name

Answer key

  1. 3
  2. Yes
  3. 1
  4. has an address bar
  5. 1
  6. a web browser
  7. Visit the site
  8. No
  9. <h1>
  10. False
  11. dog.jpg
  12. </h1>
  13. 2
  14. Art corner
  15. 2
  16. 4
  17. href
  18. <h6>
  19. 1
  20. 3
  21. False
  22. 3
  23. Easy snacks
  24. in a new tab
  25. <img>
  26. True
  27. <h1>
  28. <li>
  29. Our school bus
  30. True
  31. </small>
  32. </html>
  33. 2
  34. line 3
  35. Yes
  36. Planets
  37. an opening tag
  38. 4
  39. </h2>
  40. an attribute

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