← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 486 · 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 headings are in this code?
    <h1>Good morning!</h1>
    <p>I love mangoes.</p>
    <h3>My pets</h3>
  2. 2.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h4> or <h3>? (a) <h3> (b) <h6> (c) <h4> (d) <h1>
  3. 3.💬 Which text will NOT show on the page?
    <!-- <p>Our school trip</p> -->
    <p>Rain today</p>
    <p>Good morning!</p>
    <p>Cricket is fun.</p>
    (a) Cricket is fun. (b) Good morning! (c) Our school trip (d) Rain today
  4. 4.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="100">
    (a) The full moon (b) fort.jpg (c) bus.jpg (d) moon.png
  5. 5.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <title> (c) <h1> (d) <meta charset="utf-8">
  6. 6.📋 What number does the browser show next to “Litchi”?
    <ol>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Litchi</li>
    </ol>
  7. 7.🔗 Which address opens when you click this link?
    <a href="art.html">Take the quiz</a>
    (a) quiz.html (b) Take the quiz (c) art.html (d) news.html
  8. 8.📄 What is the first line of an HTML5 page? (a) <body> (b) <html> (c) <head> (d) <!DOCTYPE html>
  9. 9.📋 Which list tag is an unordered list? (a) <li> (b) <ul> (c) <ol>
  10. 10.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  11. 11.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>I love mangoes.</p>
    <h4>My best friend</h4>
    <p>Fun facts</p>
    <h3>Rain today</h3>
  12. 12.🖼️ Which attribute of <img> describes the picture? (a) alt (b) width (c) height (d) src
  13. 13.🔍 One closing tag is missing. Which one?
    <p>Hello, world!</p>
    <em>My pets
    <h2>Good morning!</h2>
    (a) </u> (b) </h2> (c) </em> (d) </p>
  14. 14.📄 Can HTML on its own pick a random number? (a) No (b) Yes
  15. 15.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h4>Our school trip</h4>
    <h4>Fun facts</h4>
    <h2>The red kite</h2>
  16. 16.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <p>Rain today</p>
    <!-- <p>My pets</p> -->
    <p>Hello, world!</p>
  17. 17.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <!-- <p>My pets</p> -->
    <!-- <p>The red kite</p> -->
    <!-- <p>Hello, world!</p> -->
  18. 18.Which of these is true of a web server? (a) saves our .html files (b) opens web pages for us (c) hosts websites online (d) shows pages from the web
  19. 19.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <h2>Fun facts</h2>
    <p>Good morning!</p>
    <h2>The red kite</h2>
    <h2>Our school trip</h2>
  20. 20.Which of these is an opening tag? (a) </title> (b) </h1> (c) </body> (d) <p>
  21. 21.🌐 Which one has an address bar? (a) a code editor (b) a web browser (c) a web server
  22. 22.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <h2>My best friend</h2>
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
  23. 23.📋 How many items does this list show?
    <ul>
      <li>Orange</li>
      <li>Litchi</li>
    </ul>
  24. 24.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    <h2>My pets</h2>
  25. 25.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>Cricket is fun.</p>
    <h3>My best friend</h3>
    <h2>My pets</h2>
  26. 26.🔗 Which words do you click on?
    <a href="news.html">Take the quiz</a>
    (a) Play games (b) href (c) Take the quiz (d) news.html
  27. 27.💬 Does the browser show comments on the page? (a) No (b) Yes
  28. 28.💬 How does an HTML comment end? (a) >> (b) --> (c) */ (d) //
  29. 29.🌐 Which one answers page requests? (a) a web server (b) a code editor (c) a web browser
  30. 30.True or false: HTML on its own cannot run a game loop. (a) False (b) True
  31. 31.🌐 Which one hosts websites online? (a) a web browser (b) a code editor (c) a web server
  32. 32.🏷️ Which is the closing tag for <h3>? (a) <\h3> (b) <h3> (c) <h3/> (d) </h3>
  33. 33.🔍 Which is the odd one out? (a) saves our .html files (b) shows pages from the web (c) turns HTML into a page (d) has an address bar
  34. 34.🔠 Which heading shows the SMALLEST text: <h5>, <h3>, <h1> or <h6>? (a) <h3> (b) <h6> (c) <h1> (d) <h5>
  35. 35.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
  36. 36.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h6> or <h3>? (a) <h6> (b) <h2> (c) <h3> (d) <h1>
  37. 37.🔠 How many heading levels does HTML have? (a) 4 (b) 3 (c) 6 (d) 10
  38. 38.🔗 Which words do you click on?
    <a href="news.html">Art corner</a>
    (a) Art corner (b) href (c) School news (d) news.html
  39. 39.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="300">
    (a) width (b) tiger.jpg (c) A tiger asleep (d) A red kite
  40. 40.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <meta charset="utf-8"> (c) <p> (d) <style>

Answer key

  1. 2
  2. <h6>
  3. Our school trip
  4. moon.png
  5. <h1>
  6. 3
  7. art.html
  8. <!DOCTYPE html>
  9. <ul>
  10. has a closing tag
  11. 3
  12. alt
  13. </em>
  14. No
  15. 4
  16. 3
  17. 1
  18. hosts websites online
  19. 2
  20. <p>
  21. a web browser
  22. 3
  23. 2
  24. 3
  25. 3
  26. Take the quiz
  27. No
  28. -->
  29. a web server
  30. True
  31. a web server
  32. </h3>
  33. saves our .html files
  34. <h6>
  35. in the head
  36. <h6>
  37. 6
  38. Art corner
  39. A tiger asleep
  40. <p>

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