← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 753 · 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 of these has a closing tag? (a) <b> (b) <img> (c) <br> (d) <hr>
  2. 2.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <p>Cricket is fun.</p>
    <!-- <p>Our school trip</p> -->
    <!-- <p>Good morning!</p> -->
  3. 3.🔍 Which line is missing its closing tag?
    line 1: <strong>Our school trip</strong>
    line 2: <i>Rain today
    line 3: <p>Cricket is fun.</p>
    (a) line 2 (b) line 3 (c) line 1
  4. 4.🔗 What does target="_blank" do to a link? (a) makes it blank (b) makes it bold (c) hides the link (d) opens it in a new tab
  5. 5.🖼️ Which tag puts a picture on a page? (a) <a> (b) <p> (c) <img> (d) <pic>
  6. 6.🔍 One closing tag is missing. Which one?
    <em>Hello, world!</em>
    <h2>The red kite</h2>
    <i>My pets
    (a) </em> (b) </i> (c) </h2> (d) </h3>
  7. 7.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  8. 8.📝 What does <hr> draw? (a) a table (b) a picture (c) a line across the page (d) a link
  9. 9.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<html>”? (a) <html> (b) <!DOCTYPE html>
  10. 10.🏷️ Every HTML tag starts with which sign? (a) [ (b) < (c) ( (d) {
  11. 11.🔠 Are headings shown in bold by default? (a) Yes (b) No
  12. 12.🔍 One closing tag is missing. Which one?
    <h2>Rain today</h2>
    <u>The red kite</u>
    <b>Good morning!
    (a) </b> (b) </h2> (c) </u> (d) </h1>
  13. 13.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h6> or <h2>? (a) <h5> (b) <h4> (c) <h6> (d) <h2>
  14. 14.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as one space (c) as a new line (d) as a dot
  15. 15.🖼️ Which attribute of <img> names the picture file? (a) height (b) src (c) width (d) alt
  16. 16.🔍 One closing tag is missing. Which one?
    <b>Cricket is fun.
    <small>Our school trip</small>
    <i>Rain today</i>
    (a) </em> (b) </small> (c) </i> (d) </b>
  17. 17.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <p>Hello, world!</p>
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>My pets</p> -->
  18. 18.True or false: <br> is an empty tag. (a) False (b) True
  19. 19.📛 In <a href="x.html">, what is href? (a) an attribute (b) a comment (c) an element name (d) a closing tag
  20. 20.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  21. 21.True or false: <h1> has a closing tag. (a) False (b) True
  22. 22.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 3 (c) 10 (d) 1
  23. 23.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <!-- <p>Our school trip</p> -->
    <p>Hello, world!</p>
    <!-- <p>Rain today</p> -->
    <p>I love mangoes.</p>
  24. 24.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
    <h2>My best friend</h2>
    <p>Hello, world!</p>
  25. 25.True or false: <li> shows bullet points. (a) False (b) True
  26. 26.🔤 In “HTML”, what does the M stand for? (a) Mouse (b) Machine (c) Markup (d) Modern
  27. 27.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Kites fly high<br>Stars shine<br>Sky is blue<br>Rivers flow</p>
  28. 28.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h3> or <h6>? (a) <h2> (b) <h3> (c) <h1> (d) <h6>
  29. 29.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dollar $ (c) a dot . (d) a slash /
  30. 30.💬 How does an HTML comment end? (a) >> (b) --> (c) // (d) */
  31. 31.🔍 One closing tag is missing. Which one?
    <h3>Hello, world!</h3>
    <i>Rain today
    <strong>The red kite</strong>
    (a) </em> (b) </strong> (c) </i> (d) </h3>
  32. 32.📋 Which list tag lists steps in order? (a) <ol> (b) <li> (c) <ul>
  33. 33.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>I love mangoes.</p>
    <p>My pets</p>
    <!-- <p>My best friend</p> -->
    (a) Fun facts (b) My best friend (c) My pets (d) I love mangoes.
  34. 34.Which of these has a closing tag? (a) <meta> (b) <title> (c) <img> (d) <hr>
  35. 35.🔗 Which address opens when you click this link?
    <a href="about.html">Contact us</a>
    (a) about.html (b) contact.html (c) https://example.com (d) Contact us
  36. 36.True or false: in <img>, src tells which image to load. (a) True (b) False
  37. 37.🔍 One closing tag is missing. Which one?
    <h3>Hello, world!
    <p>The red kite</p>
    <h1>I love mangoes.</h1>
    (a) </u> (b) </h1> (c) </p> (d) </h3>
  38. 38.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>My pets</p>
    <!-- <p>Cricket is fun.</p> -->
    (a) I love mangoes. (b) My pets (c) Cricket is fun.
  39. 39.Which of these goes in the head? (a) <title> (b) <h1> (c) <table> (d) <img>
  40. 40.🔠 Which tag is the least important heading? (a) <p> (b) <h6> (c) <h3> (d) <h1>

Answer key

  1. <b>
  2. 1
  3. line 2
  4. opens it in a new tab
  5. <img>
  6. </i>
  7. an opening tag
  8. a line across the page
  9. <!DOCTYPE html>
  10. <
  11. Yes
  12. </b>
  13. <h6>
  14. as one space
  15. src
  16. </b>
  17. 2
  18. True
  19. an attribute
  20. Yes
  21. True
  22. 1
  23. 3
  24. 3
  25. False
  26. Markup
  27. 5
  28. <h6>
  29. a slash /
  30. -->
  31. </i>
  32. <ol>
  33. My best friend
  34. <title>
  35. about.html
  36. True
  37. </h3>
  38. Cricket is fun.
  39. <title>
  40. <h6>

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