← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 450 · 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 words do you click on?
    <a href="quiz.html">Visit the site</a>
    (a) href (b) Visit the site (c) quiz.html (d) Maths fun
  2. 2.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <!-- <p>Rain today</p> -->
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>The red kite</p> -->
  3. 3.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an attribute (c) a comment (d) an element name
  4. 4.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
  5. 5.🔠 How many heading levels does HTML have? (a) 6 (b) 3 (c) 10 (d) 4
  6. 6.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>My pets</p>
    (a) My best friend (b) Cricket is fun. (c) My pets
  7. 7.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) width (c) height (d) alt
  8. 8.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h4> or <h2>? (a) <h2> (b) <h4> (c) <h1> (d) <h5>
  9. 9.🏷️ Which is the closing tag for <small>? (a) <\small> (b) <small> (c) </small> (d) <small/>
  10. 10.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>My pets</p>
    <p>My best friend</p>
    <p>I love mangoes.</p>
  11. 11.📝 What does <p> make? (a) a link (b) a table (c) a picture (d) a paragraph
  12. 12.📋 Which list tag shows bullet points? (a) <li> (b) <ol> (c) <ul>
  13. 13.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <p>The red kite</p>
    <p>My best friend</p>
  14. 14.True or false: a web browser hosts websites online. (a) True (b) False
  15. 15.Which of these is an empty tag? (a) <h1> (b) <ul> (c) <input> (d) <li>
  16. 16.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  17. 17.💬 Why do coders write comments? (a) to make links (b) to leave notes (c) to add colour (d) to show pictures
  18. 18.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="250">
  19. 19.🔗 Which attribute holds the address of a link? (a) id (b) src (c) alt (d) href
  20. 20.True or false: a web browser shows pages from the web. (a) True (b) False
  21. 21.📋 Which tag goes around each item of a list? (a) <ul> (b) <ol> (c) <p> (d) <li>
  22. 22.🔗 Which address opens when you click this link?
    <a href="maths.html">Take the quiz</a>
    (a) Take the quiz (b) news.html (c) maths.html (d) art.html
  23. 23.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="200">
    (a) An old fort (b) tiger.jpg (c) fort.jpg (d) kite.png
  24. 24.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>Hello, world!</p>
    <p>Our school trip</p>
    <p>I love mangoes.</p>
    (a) Hello, world! (b) Rain today (c) I love mangoes. (d) Our school trip
  25. 25.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <p>Good morning!</p>
    <p>I love mangoes.</p>
  26. 26.True or false: <ul> is an empty tag. (a) False (b) True
  27. 27.🔤 In “HTML”, what does the L stand for? (a) Link (b) Laptop (c) Line (d) Language
  28. 28.📝 What does <hr> draw? (a) a line across the page (b) a link (c) a table (d) a picture
  29. 29.📝 What does <br> do? (a) makes text bold (b) makes a list (c) starts a new line (d) adds a picture
  30. 30.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="200">
    (a) Our school bus (b) An old fort (c) bus.jpg (d) width
  31. 31.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>The red kite</p>
    <p>My best friend</p>
    <p>Cricket is fun.</p>
  32. 32.🔗 Which address opens when you click this link?
    <a href="https://example.com">School news</a>
    (a) art.html (b) maths.html (c) https://example.com (d) School news
  33. 33.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  34. 34.🔗 Which tag makes a clickable link? (a) <img> (b) <p> (c) <link> (d) <a>
  35. 35.💬 How does an HTML comment end? (a) --> (b) */ (c) // (d) >>
  36. 36.🔢 In a basic web page file, which comes first: “</head>” or “</body>”? (a) </body> (b) </head>
  37. 37.True or false: a code editor colours code to help us. (a) True (b) False
  38. 38.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
  39. 39.💬 Which text will NOT show on the page?
    <!-- <p>The red kite</p> -->
    <p>Cricket is fun.</p>
    <p>My pets</p>
    <p>My best friend</p>
    (a) My best friend (b) The red kite (c) Cricket is fun. (d) My pets
  40. 40.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>My pets</p>
    <p>Our school trip</p>
    <!-- <p>I love mangoes.</p> -->
    (a) Our school trip (b) My pets (c) The red kite (d) I love mangoes.

Answer key

  1. Visit the site
  2. 1
  3. an attribute
  4. in the head
  5. 6
  6. Cricket is fun.
  7. height
  8. <h1>
  9. </small>
  10. 3
  11. a paragraph
  12. <ul>
  13. 2
  14. False
  15. <input>
  16. has a closing tag
  17. to leave notes
  18. 250
  19. href
  20. True
  21. <li>
  22. maths.html
  23. fort.jpg
  24. Rain today
  25. 2
  26. False
  27. Language
  28. a line across the page
  29. starts a new line
  30. Our school bus
  31. 4
  32. https://example.com
  33. No
  34. <a>
  35. -->
  36. </head>
  37. True
  38. Yes
  39. The red kite
  40. I love mangoes.

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