← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 679 · 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.📄 Can HTML on its own make tables? (a) No (b) Yes
  2. 2.Which of these is true of a web server? (a) saves our .html files (b) turns HTML into a page (c) shows line numbers (d) sends pages over the net
  3. 3.Which of these has a closing tag? (a) <meta> (b) <h1> (c) <img> (d) <hr>
  4. 4.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  5. 5.🏷️ Which is the closing tag for <p>? (a) <p> (b) </p> (c) <p/> (d) <\p>
  6. 6.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h2> or <h1>? (a) <h1> (b) <h3> (c) <h5> (d) <h2>
  7. 7.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h4> or <h3>? (a) <h6> (b) <h5> (c) <h4> (d) <h3>
  8. 8.True or false: <li> is an ordered list. (a) True (b) False
  9. 9.📋 What number does the browser show next to “Grapes”?
    <ol>
      <li>Jamun</li>
      <li>Orange</li>
      <li>Grapes</li>
    </ol>
  10. 10.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Rivers flow<br>Kites fly high</p>
  11. 11.🔗 Which words do you click on?
    <a href="maths.html">Play games</a>
    (a) About us (b) Play games (c) href (d) maths.html
  12. 12.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="200">
    (a) moon.png (b) A happy dog (c) dog.jpg (d) bus.jpg
  13. 13.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <h2>Cricket is fun.</h2>
    <h2>My best friend</h2>
    <h2>Cricket is fun.</h2>
    <p>Our school trip</p>
    <h2>My best friend</h2>
  14. 14.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it bold (d) makes it blank
  15. 15.🔍 Which is the odd one out? (a) saves our .html files (b) colours code to help us (c) is where we type code (d) stores a website’s files
  16. 16.🔠 Are headings shown in bold by default? (a) No (b) Yes
  17. 17.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <p> (d) <a>
  18. 18.📋 Does this list show bullets or numbers?
    <ol>
      <li>Litchi</li>
      <li>Jamun</li>
    </ol>
    (a) bullets (b) numbers
  19. 19.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <p>I love mangoes.</p>
    <!-- <p>My pets</p> -->
    <p>My best friend</p>
  20. 20.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as 5 spaces (c) as one space (d) as a new line
  21. 21.True or false: in <img>, src describes the picture. (a) False (b) True
  22. 22.💬 How does an HTML comment start? (a) // (b) /* (c) <!-- (d) #
  23. 23.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="300">
    (a) kite.png (b) A tiger asleep (c) map.png (d) tiger.jpg
  24. 24.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <p>Cricket is fun.</p>
    <p>Our school trip</p>
    <!-- <p>Hello, world!</p> -->
    <p>Fun facts</p>
  25. 25.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a src="about.html">
  26. 26.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h3> or <h4>? (a) <h4> (b) <h3> (c) <h5> (d) <h6>
  27. 27.🔍 Which line is missing its closing tag?
    line 1: <i>I love mangoes.</i>
    line 2: <small>My pets
    line 3: <h1>Hello, world!</h1>
    (a) line 1 (b) line 2 (c) line 3
  28. 28.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h5> or <h1>? (a) <h4> (b) <h5> (c) <h2> (d) <h1>
  29. 29.Which of these goes in the head? (a) <p> (b) <img> (c) <meta charset="utf-8"> (d) <a>
  30. 30.🔗 Which address opens when you click this link?
    <a href="about.html">Take the quiz</a>
    (a) https://example.com (b) about.html (c) contact.html (d) Take the quiz
  31. 31.🖼️ Why do we add alt text to an image? (a) to colour it (b) to make it bigger (c) to load it faster (d) to describe the image
  32. 32.🏷️ Every HTML tag starts with which sign? (a) ( (b) [ (c) { (d) <
  33. 33.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="150">
    (a) Our school bus (b) width (c) moon.png (d) The full moon
  34. 34.🔗 Where does this link open?
    <a href="maths.html">Contact us</a>
    (a) in a new tab (b) in the same tab
  35. 35.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
  36. 36.🔗 Which words do you click on?
    <a href="art.html">About us</a>
    (a) art.html (b) Contact us (c) href (d) About us
  37. 37.🔗 Which words do you click on?
    <a href="games.html">About us</a>
    (a) Contact us (b) href (c) About us (d) games.html
  38. 38.🔗 Which address opens when you click this link?
    <a href="quiz.html">Visit the site</a>
    (a) Visit the site (b) about.html (c) games.html (d) quiz.html
  39. 39.🖼️ Which attribute of <img> shows if the image fails? (a) alt (b) height (c) src (d) width
  40. 40.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) <html> (c) <head> (d) </body>

Answer key

  1. Yes
  2. sends pages over the net
  3. <h1>
  4. Yes
  5. </p>
  6. <h5>
  7. <h3>
  8. False
  9. 3
  10. 3
  11. Play games
  12. dog.jpg
  13. 2
  14. opens it in a new tab
  15. stores a website’s files
  16. Yes
  17. <a>
  18. numbers
  19. 3
  20. as one space
  21. False
  22. <!--
  23. tiger.jpg
  24. 4
  25. <a href="about.html">
  26. <h3>
  27. line 2
  28. <h1>
  29. <meta charset="utf-8">
  30. about.html
  31. to describe the image
  32. <
  33. The full moon
  34. in the same tab
  35. Yes
  36. About us
  37. About us
  38. quiz.html
  39. alt
  40. <!DOCTYPE html>

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