← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 597 · 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>My best friend</p>
    <h2>Our school trip</h2>
    <h2>Our school trip</h2>
  2. 2.🔗 Which address opens when you click this link?
    <a href="maths.html">About us</a>
    (a) art.html (b) news.html (c) maths.html (d) About us
  3. 3.🏷️ Every HTML tag starts with which sign? (a) ( (b) { (c) [ (d) <
  4. 4.🔍 Which is the odd one out? (a) turns HTML into a page (b) shows pages from the web (c) shows line numbers (d) has an address bar
  5. 5.📋 How many items does this list show?
    <ul>
      <li>Orange</li>
      <li>Litchi</li>
      <li>Grapes</li>
      <li>Jamun</li>
    </ul>
  6. 6.📋 Does this list show bullets or numbers?
    <ul>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Banana</li>
    </ul>
    (a) numbers (b) bullets
  7. 7.🔗 Where does this link open?
    <a href="quiz.html" target="_blank">About us</a>
    (a) in the same tab (b) in a new tab
  8. 8.🔍 Which line is missing its closing tag?
    line 1: <small>My pets
    line 2: <u>Good morning!</u>
    line 3: <b>Hello, world!</b>
    (a) line 1 (b) line 3 (c) line 2
  9. 9.Which of these is a closing tag? (a) <li> (b) <b> (c) </title> (d) <h1>
  10. 10.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h6> or <h5>? (a) <h1> (b) <h5> (c) <h6> (d) <h3>
  11. 11.Which of these is a closing tag? (a) <p> (b) <h1> (c) </h1> (d) <b>
  12. 12.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>Fun facts</p>
    <p>Good morning!</p>
  13. 13.True or false: <ul> goes in the head. (a) False (b) True
  14. 14.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h2> or <h3>? (a) <h6> (b) <h3> (c) <h1> (d) <h2>
  15. 15.🔍 One closing tag is missing. Which one?
    <strong>My pets</strong>
    <h2>Good morning!
    <p>Rain today</p>
    (a) </h2> (b) </strong> (c) </p> (d) </small>
  16. 16.True or false: in <img>, width sets how tall it is. (a) False (b) True
  17. 17.True or false: a web browser has an address bar. (a) False (b) True
  18. 18.True or false: <ul> shows bullet points. (a) False (b) True
  19. 19.🏷️ Which is the closing tag for <small>? (a) </small> (b) <small/> (c) <\small> (d) <small>
  20. 20.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="400">
    (a) A happy dog (b) Birthday cake (c) width (d) cake.jpg
  21. 21.Which of these is true of a web browser? (a) answers page requests (b) opens web pages for us (c) colours code to help us (d) stores a website’s files
  22. 22.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) alt (c) width (d) height
  23. 23.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) src (c) height (d) width
  24. 24.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Roses are red<br>Sky is blue<br>Stars shine<br>Kites fly high</p>
  25. 25.📋 What number does the browser show next to “Litchi”?
    <ol>
      <li>Orange</li>
      <li>Grapes</li>
      <li>Litchi</li>
    </ol>
  26. 26.🔗 Which attribute holds the address of a link? (a) href (b) id (c) src (d) alt
  27. 27.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
  28. 28.🌐 Which one shows pages from the web? (a) a web browser (b) a web server (c) a code editor
  29. 29.🔗 Which words do you click on?
    <a href="maths.html">About us</a>
    (a) Contact us (b) maths.html (c) About us (d) href
  30. 30.🔍 Which line is missing its closing tag?
    line 1: <p>Fun facts
    line 2: <small>Hello, world!</small>
    line 3: <b>My pets</b>
    (a) line 2 (b) line 3 (c) line 1
  31. 31.📄 Can HTML on its own make headings? (a) Yes (b) No
  32. 32.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <html> (c) <head> (d) <body>
  33. 33.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a src="about.html"> (c) <link about.html> (d) <a href="about.html">
  34. 34.💬 Why do coders write comments? (a) to make links (b) to add colour (c) to show pictures (d) to leave notes
  35. 35.Which of these is an opening tag? (a) <b> (b) </title> (c) </p> (d) </h1>
  36. 36.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h4> or <h5>? (a) <h2> (b) <h4> (c) <h5> (d) <h3>
  37. 37.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  38. 38.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
  39. 39.📋 Which list tag shows bullet points? (a) <ol> (b) <li> (c) <ul>
  40. 40.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>Fun facts</p>
    <p>Hello, world!</p>

Answer key

  1. 1
  2. maths.html
  3. <
  4. shows line numbers
  5. 4
  6. bullets
  7. in a new tab
  8. line 1
  9. </title>
  10. <h6>
  11. </h1>
  12. 1
  13. False
  14. <h1>
  15. </h2>
  16. False
  17. True
  18. True
  19. </small>
  20. Birthday cake
  21. opens web pages for us
  22. height
  23. alt
  24. 5
  25. 3
  26. href
  27. 2
  28. a web browser
  29. About us
  30. line 1
  31. Yes
  32. <!DOCTYPE html>
  33. <a href="about.html">
  34. to leave notes
  35. <b>
  36. <h5>
  37. an opening tag
  38. in the body
  39. <ul>
  40. 3

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