← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 190 · 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 picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="250">
    (a) moon.png (b) dog.jpg (c) cake.jpg (d) Birthday cake
  2. 2.🔗 Which words do you click on?
    <a href="https://example.com">Contact us</a>
    (a) href (b) Contact us (c) Visit the site (d) https://example.com
  3. 3.🏷️ Which is the closing tag for <p>? (a) <p> (b) <\p> (c) <p/> (d) </p>
  4. 4.🔠 Which tag is the least important heading? (a) <p> (b) <h1> (c) <h6> (d) <h3>
  5. 5.📋 How many items does this list show?
    <ol>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Litchi</li>
      <li>Mango</li>
      <li>Grapes</li>
      <li>Guava</li>
    </ol>
  6. 6.💬 Which text will NOT show on the page?
    <!-- <p>Our school trip</p> -->
    <p>Good morning!</p>
    <p>Fun facts</p>
    (a) Good morning! (b) Our school trip (c) Fun facts
  7. 7.📄 What is the first line of an HTML5 page? (a) <html> (b) <body> (c) <!DOCTYPE html> (d) <head>
  8. 8.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 3 (c) 6 (d) 10
  9. 9.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <link> (d) <a>
  10. 10.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  11. 11.🔠 How many heading levels does HTML have? (a) 3 (b) 10 (c) 4 (d) 6
  12. 12.True or false: <ol> shows bullet points. (a) True (b) False
  13. 13.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Try this poha. (b) My drawings (c) body (d) Class 7 Blog
  14. 14.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <p>My best friend</p>
    <h2>I love mangoes.</h2>
  15. 15.🔗 Where does this link open?
    <a href="quiz.html" target="_blank">Maths fun</a>
    (a) in a new tab (b) in the same tab
  16. 16.🌐 Which one turns HTML into a page? (a) a code editor (b) a web server (c) a web browser
  17. 17.💬 How does an HTML comment end? (a) --> (b) // (c) */ (d) >>
  18. 18.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="300">
  19. 19.🏷️ Which is the closing tag for <u>? (a) <u> (b) </u> (c) <u/> (d) <\u>
  20. 20.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="200">
    (a) tiger.jpg (b) kite.png (c) An old fort (d) fort.jpg
  21. 21.Which of these goes in the head? (a) <ul> (b) <table> (c) <link rel="stylesheet"> (d) <h1>
  22. 22.📄 Can HTML on its own keep a high score? (a) Yes (b) No
  23. 23.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
  24. 24.💾 A web page file usually ends with which extension? (a) .png (b) .mp3 (c) .txt (d) .html
  25. 25.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="250">
  26. 26.🏷️ Which is the closing tag for <strong>? (a) <strong> (b) <strong/> (c) </strong> (d) <\strong>
  27. 27.🔗 Where does this link open?
    <a href="games.html" target="_blank">Take the quiz</a>
    (a) in the same tab (b) in a new tab
  28. 28.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  29. 29.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h2> or <h4>? (a) <h5> (b) <h4> (c) <h2> (d) <h1>
  30. 30.🔗 Which words do you click on?
    <a href="news.html">Maths fun</a>
    (a) news.html (b) Art corner (c) href (d) Maths fun
  31. 31.True or false: in <img>, height sets how tall it is. (a) False (b) True
  32. 32.🔠 Are headings shown in bold by default? (a) No (b) Yes
  33. 33.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
  34. 34.📄 Can HTML on its own make tables? (a) No (b) Yes
  35. 35.🔍 Which is the odd one out? (a) turns HTML into a page (b) has an address bar (c) sends pages over the net (d) opens web pages for us
  36. 36.📄 Where does <a> go: in the head or in the body? (a) in the body (b) in the head
  37. 37.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>I love mangoes.</p>
    <!-- <p>My best friend</p> -->
    <p>Cricket is fun.</p>
  38. 38.Which of these goes in the head? (a) <style> (b) <p> (c) <ul> (d) <a>
  39. 39.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h3>Cricket is fun.</h3>
    <h3>Rain today</h3>
  40. 40.📋 Which list tag is one item of a list? (a) <ul> (b) <ol> (c) <li>

Answer key

  1. cake.jpg
  2. Contact us
  3. </p>
  4. <h6>
  5. 6
  6. Our school trip
  7. <!DOCTYPE html>
  8. 1
  9. <a>
  10. Yes
  11. 6
  12. False
  13. My drawings
  14. 2
  15. in a new tab
  16. a web browser
  17. -->
  18. 300
  19. </u>
  20. fort.jpg
  21. <link rel="stylesheet">
  22. No
  23. in the body
  24. .html
  25. 250
  26. </strong>
  27. in a new tab
  28. an opening tag
  29. <h1>
  30. Maths fun
  31. True
  32. Yes
  33. No
  34. Yes
  35. sends pages over the net
  36. in the body
  37. 2
  38. <style>
  39. 3
  40. <li>

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