← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 261 · 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 pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="250">
  2. 2.📋 Which list tag is an unordered list? (a) <ul> (b) <li> (c) <ol>
  3. 3.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
  4. 4.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  5. 5.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  6. 6.True or false: <h1> has a closing tag. (a) False (b) True
  7. 7.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>The red kite</p>
    <p>Our school trip</p>
  8. 8.🔗 What does target="_blank" do to a link? (a) makes it bold (b) hides the link (c) opens it in a new tab (d) makes it blank
  9. 9.🔠 Are headings shown in bold by default? (a) No (b) Yes
  10. 10.💬 Which text will NOT show on the page?
    <!-- <p>Fun facts</p> -->
    <p>Hello, world!</p>
    <p>My pets</p>
    (a) Hello, world! (b) Fun facts (c) My pets
  11. 11.🔢 In a basic web page file, which comes first: “</head>” or “<html>”? (a) <html> (b) </head>
  12. 12.🔗 Where does this link open?
    <a href="maths.html" target="_blank">Visit the site</a>
    (a) in the same tab (b) in a new tab
  13. 13.🌐 Which one stores a website’s files? (a) a web browser (b) a code editor (c) a web server
  14. 14.📋 Which list tag goes inside ul or ol? (a) <ul> (b) <ol> (c) <li>
  15. 15.🔤 In “HTML”, what do the letters HT stand for? (a) Home Text (b) Hot Tags (c) HyperText (d) High Tech
  16. 16.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <p>My best friend</p>
    <h2>Rain today</h2>
  17. 17.Which of these is true of a web server? (a) shows pages from the web (b) colours code to help us (c) is where we type code (d) sends pages over the net
  18. 18.True or false: <h1> is an empty tag. (a) False (b) True
  19. 19.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h4> or <h1>? (a) <h5> (b) <h1> (c) <h2> (d) <h4>
  20. 20.🔢 In a basic web page file, which comes LAST? (a) <!DOCTYPE html> (b) </head> (c) <head> (d) </html>
  21. 21.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  22. 22.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h3>My pets</h3>
    <h3>Rain today</h3>
    <h2>Hello, world!</h2>
  23. 23.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <p>My pets</p>
    <!-- <p>Our school trip</p> -->
    (a) My best friend (b) Our school trip (c) My pets
  24. 24.🖼️ Which tag puts a picture on a page? (a) <p> (b) <img> (c) <pic> (d) <a>
  25. 25.📋 Which list tag lists steps in order? (a) <li> (b) <ul> (c) <ol>
  26. 26.True or false: <b> has a closing tag. (a) True (b) False
  27. 27.Which of these is an empty tag? (a) <input> (b) <title> (c) <p> (d) <li>
  28. 28.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <p>Hello, world!</p>
    <p>My pets</p>
    <p>My best friend</p>
    <!-- <p>I love mangoes.</p> -->
  29. 29.📋 Which list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <ul> (d) <br>
  30. 30.🔗 Which words do you click on?
    <a href="news.html">About us</a>
    (a) news.html (b) Contact us (c) href (d) About us
  31. 31.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
  32. 32.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="150">
    (a) An old fort (b) tiger.jpg (c) fort.jpg (d) kite.png
  33. 33.🔍 One closing tag is missing. Which one?
    <em>I love mangoes.</em>
    <strong>Fun facts
    <b>Our school trip</b>
    (a) </i> (b) </em> (c) </b> (d) </strong>
  34. 34.🔗 Which address opens when you click this link?
    <a href="contact.html">Contact us</a>
    (a) maths.html (b) https://example.com (c) Contact us (d) contact.html
  35. 35.Which of these is true of a code editor? (a) shows line numbers (b) stores a website’s files (c) answers page requests (d) has an address bar
  36. 36.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h4> or <h1>? (a) <h3> (b) <h2> (c) <h1> (d) <h4>
  37. 37.True or false: a web browser colours code to help us. (a) False (b) True
  38. 38.📝 What does <br> do? (a) makes a list (b) makes text bold (c) starts a new line (d) adds a picture
  39. 39.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  40. 40.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <h2>Good morning!</h2>
    <h2>Good morning!</h2>

Answer key

  1. 250
  2. <ul>
  3. in the head
  4. No
  5. Yes
  6. True
  7. 1
  8. opens it in a new tab
  9. Yes
  10. Fun facts
  11. <html>
  12. in a new tab
  13. a web server
  14. <li>
  15. HyperText
  16. 2
  17. sends pages over the net
  18. False
  19. <h5>
  20. </html>
  21. a closing tag
  22. 4
  23. Our school trip
  24. <img>
  25. <ol>
  26. True
  27. <input>
  28. 4
  29. <ul>
  30. About us
  31. in the body
  32. fort.jpg
  33. </strong>
  34. contact.html
  35. shows line numbers
  36. <h1>
  37. False
  38. starts a new line
  39. an opening tag
  40. 1

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