← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 308 · 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.True or false: <style> goes in the body. (a) True (b) False
  2. 2.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h6> (c) <h1> (d) <p>
  3. 3.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <ol> (d) <hr>
  4. 4.🔗 Where does this link open?
    <a href="contact.html">School news</a>
    (a) in the same tab (b) in a new tab
  5. 5.📋 Which list tag is an ordered list? (a) <li> (b) <ul> (c) <ol>
  6. 6.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <!-- <p>The red kite</p> -->
    <!-- <p>Hello, world!</p> -->
    <p>I love mangoes.</p>
    <p>Our school trip</p>
  7. 7.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <h2>Hello, world!</h2>
    <p>Cricket is fun.</p>
    <p>Cricket is fun.</p>
  8. 8.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>I love mangoes.</p>
    <h2>My best friend</h2>
    <p>Good morning!</p>
  9. 9.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
  10. 10.True or false: <b> is an empty tag. (a) False (b) True
  11. 11.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  12. 12.📋 Which list tag is an unordered list? (a) <ol> (b) <ul> (c) <li>
  13. 13.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>The red kite</p>
    <!-- <p>Good morning!</p> -->
  14. 14.🌐 Which one shows pages from the web? (a) a web browser (b) a web server (c) a code editor
  15. 15.True or false: a code editor has an address bar. (a) True (b) False
  16. 16.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Stars shine<br>Roses are red<br>Sky is blue<br>Kites fly high</p>
  17. 17.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="100">
    (a) bus.jpg (b) tiger.jpg (c) fort.jpg (d) Our school bus
  18. 18.True or false: <img> is an empty tag. (a) False (b) True
  19. 19.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>Fun facts</p>
    <!-- <p>Hello, world!</p> -->
    (a) I love mangoes. (b) Fun facts (c) Hello, world!
  20. 20.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    <p>Our school trip</p>
    (a) Hello, world! (b) Our school trip (c) I love mangoes. (d) Rain today
  21. 21.🌐 Which one has an address bar? (a) a web browser (b) a web server (c) a code editor
  22. 22.True or false: a web server has an address bar. (a) True (b) False
  23. 23.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Roses are red<br>Rivers flow<br>Sky is blue<br>Birds sing</p>
  24. 24.💬 How does an HTML comment end? (a) */ (b) // (c) >> (d) -->
  25. 25.🏷️ Which is the closing tag for <h2>? (a) <h2/> (b) </h2> (c) <h2> (d) <\h2>
  26. 26.🔢 In a basic web page file, which comes FIRST? (a) </body> (b) <html> (c) <!DOCTYPE html> (d) <body>
  27. 27.📄 Can HTML on its own make headings? (a) No (b) Yes
  28. 28.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>Fun facts</p>
    <!-- <p>My pets</p> -->
  29. 29.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Kites fly high<br>Roses are red<br>Birds sing<br>Stars shine</p>
  30. 30.🔗 Which words do you click on?
    <a href="news.html">Maths fun</a>
    (a) news.html (b) Maths fun (c) href (d) Art corner
  31. 31.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <h2>Good morning!</h2>
    <h2>My pets</h2>
  32. 32.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h2> or <h1>? (a) <h1> (b) <h4> (c) <h5> (d) <h2>
  33. 33.True or false: a code editor opens web pages for us. (a) True (b) False
  34. 34.📄 Can HTML on its own keep a high score? (a) Yes (b) No
  35. 35.💬 Why do coders write comments? (a) to make links (b) to leave notes (c) to show pictures (d) to add colour
  36. 36.🔍 One closing tag is missing. Which one?
    <h2>My best friend
    <em>My pets</em>
    <p>Cricket is fun.</p>
    (a) </small> (b) </p> (c) </h2> (d) </em>
  37. 37.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a href="about.html"> (d) <a src="about.html">
  38. 38.📋 Which tag goes around each item of a list? (a) <ol> (b) <li> (c) <ul> (d) <p>
  39. 39.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
  40. 40.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>My best friend</p>
    <p>Good morning!</p>
    <h3>Our school trip</h3>

Answer key

  1. False
  2. <h1>
  3. <ol>
  4. in the same tab
  5. <ol>
  6. 2
  7. 3
  8. 2
  9. in the head
  10. False
  11. a closing tag
  12. <ul>
  13. 1
  14. a web browser
  15. False
  16. 5
  17. bus.jpg
  18. True
  19. Hello, world!
  20. Rain today
  21. a web browser
  22. False
  23. 5
  24. -->
  25. </h2>
  26. <!DOCTYPE html>
  27. Yes
  28. 2
  29. 5
  30. Maths fun
  31. 1
  32. <h1>
  33. False
  34. No
  35. to leave notes
  36. </h2>
  37. <a href="about.html">
  38. <li>
  39. in the body
  40. 2

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