← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 470 · 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>Our school trip</p>
    <p>I love mangoes.</p>
    <p>My best friend</p>
    <h2>Cricket is fun.</h2>
    <p>The red kite</p>
  2. 2.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  3. 3.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
  4. 4.True or false: a code editor turns HTML into a page. (a) True (b) False
  5. 5.🔗 Which attribute holds the address of a link? (a) src (b) href (c) alt (d) id
  6. 6.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <!-- <p>Fun facts</p> -->
    <p>Hello, world!</p>
    (a) Hello, world! (b) The red kite (c) Fun facts
  7. 7.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  8. 8.🔗 Which words do you click on?
    <a href="https://example.com">About us</a>
    (a) https://example.com (b) Contact us (c) About us (d) href
  9. 9.📄 What is the first line of an HTML5 page? (a) <head> (b) <!DOCTYPE html> (c) <html> (d) <body>
  10. 10.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<body>”? (a) <!DOCTYPE html> (b) <body>
  11. 11.📄 Can HTML on its own make a form? (a) No (b) Yes
  12. 12.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 4 (d) 3
  13. 13.Which of these is a closing tag? (a) <li> (b) <h1> (c) <title> (d) </b>
  14. 14.🔗 Which words do you click on?
    <a href="https://example.com">Maths fun</a>
    (a) https://example.com (b) Art corner (c) Maths fun (d) href
  15. 15.📄 Can HTML on its own pick a random number? (a) No (b) Yes
  16. 16.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="250">
  17. 17.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h4> or <h3>? (a) <h6> (b) <h4> (c) <h3> (d) <h2>
  18. 18.🔤 In “HTML”, what do the letters HT stand for? (a) Home Text (b) HyperText (c) Hot Tags (d) High Tech
  19. 19.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Sky is blue</p>
  20. 20.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <h4>Cricket is fun.</h4>
    <h2>Rain today</h2>
    <h4>I love mangoes.</h4>
  21. 21.Which of these is true of a web browser? (a) has an address bar (b) hosts websites online (c) stores a website’s files (d) answers page requests
  22. 22.🔗 Which words do you click on?
    <a href="quiz.html">About us</a>
    (a) Contact us (b) About us (c) href (d) quiz.html
  23. 23.💬 How does an HTML comment end? (a) */ (b) >> (c) // (d) -->
  24. 24.🖼️ Which tag puts a picture on a page? (a) <p> (b) <a> (c) <img> (d) <pic>
  25. 25.Which of these is an opening tag? (a) </title> (b) <li> (c) </p> (d) </body>
  26. 26.🏷️ Which is the closing tag for <small>? (a) <small> (b) </small> (c) <\small> (d) <small/>
  27. 27.🔍 Which line is missing its closing tag?
    line 1: <small>The red kite
    line 2: <i>Rain today</i>
    line 3: <h2>Our school trip</h2>
    (a) line 1 (b) line 3 (c) line 2
  28. 28.🏷️ Which is the closing tag for <u>? (a) <u> (b) <\u> (c) <u/> (d) </u>
  29. 29.🖼️ Which attribute of <img> sets how tall it is? (a) height (b) src (c) width (d) alt
  30. 30.💬 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>The red kite</p> -->
  31. 31.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h1> or <h5>? (a) <h6> (b) <h2> (c) <h1> (d) <h5>
  32. 32.📋 What number does the browser show next to “Jamun”?
    <ol start="3">
      <li>Mango</li>
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Orange</li>
    </ol>
  33. 33.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <p>Rain today</p>
    <p>Hello, world!</p>
    <h2>My pets</h2>
    <p>Cricket is fun.</p>
  34. 34.🔗 Which address opens when you click this link?
    <a href="art.html">Art corner</a>
    (a) quiz.html (b) Art corner (c) art.html (d) news.html
  35. 35.📋 What number does the browser show next to “Banana”?
    <ol start="6">
      <li>Litchi</li>
      <li>Banana</li>
      <li>Mango</li>
      <li>Grapes</li>
      <li>Guava</li>
    </ol>
  36. 36.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  37. 37.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
    <!-- <p>My best friend</p> -->
    <p>Rain today</p>
    (a) Fun facts (b) Cricket is fun. (c) Rain today (d) My best friend
  38. 38.🏷️ Which is the closing tag for <i>? (a) <i> (b) <i/> (c) <\i> (d) </i>
  39. 39.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>The red kite</p>
    <h2>My best friend</h2>
  40. 40.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h5> or <h4>? (a) <h6> (b) <h4> (c) <h2> (d) <h5>

Answer key

  1. 4
  2. Yes
  3. in the body
  4. False
  5. href
  6. Fun facts
  7. a closing tag
  8. About us
  9. <!DOCTYPE html>
  10. <!DOCTYPE html>
  11. Yes
  12. 6
  13. </b>
  14. Maths fun
  15. No
  16. 250
  17. <h2>
  18. HyperText
  19. 2
  20. 4
  21. has an address bar
  22. About us
  23. -->
  24. <img>
  25. <li>
  26. </small>
  27. line 1
  28. </u>
  29. height
  30. 4
  31. <h1>
  32. 5
  33. 4
  34. art.html
  35. 7
  36. has a closing tag
  37. My best friend
  38. </i>
  39. 2
  40. <h6>

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