← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 154 · 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>
    <p>My pets</p>
    <h2>Our school trip</h2>
  2. 2.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="300">
    (a) A red kite (b) width (c) kite.png (d) Map of India
  3. 3.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  4. 4.🔍 Which line is missing its closing tag?
    line 1: <b>Fun facts
    line 2: <h2>I love mangoes.</h2>
    line 3: <h1>Hello, world!</h1>
    (a) line 3 (b) line 2 (c) line 1
  5. 5.📄 Can HTML on its own make bullet lists? (a) Yes (b) No
  6. 6.🔍 Which line is missing its closing tag?
    line 1: <h1>My pets</h1>
    line 2: <em>Our school trip</em>
    line 3: <u>Hello, world!
    (a) line 3 (b) line 2 (c) line 1
  7. 7.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) alt (c) height (d) width
  8. 8.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <!-- <p>My best friend</p> -->
    <p>Good morning!</p>
    (a) My best friend (b) Good morning! (c) My pets
  9. 9.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Sky is blue<br>Rivers flow<br>Stars shine</p>
  10. 10.💬 Which text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>The red kite</p>
    <p>Rain today</p>
    (a) The red kite (b) Rain today (c) My pets
  11. 11.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <p>My pets</p>
    <p>Good morning!</p>
    <p>Cricket is fun.</p>
    <p>My best friend</p>
  12. 12.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <p>Rain today</p>
    <p>My pets</p>
    <p>Hello, world!</p>
    <!-- <p>I love mangoes.</p> -->
  13. 13.True or false: HTML on its own can add up two numbers. (a) True (b) False
  14. 14.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="150">
    (a) A red kite (b) Map of India (c) kite.png (d) width
  15. 15.🌐 Which one saves our .html files? (a) a web server (b) a code editor (c) a web browser
  16. 16.🔍 Which line is missing its closing tag?
    line 1: <h2>Rain today
    line 2: <strong>Fun facts</strong>
    line 3: <u>My pets</u>
    (a) line 2 (b) line 3 (c) line 1
  17. 17.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h2> or <h3>? (a) <h2> (b) <h1> (c) <h3> (d) <h5>
  18. 18.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <!-- <p>Good morning!</p> -->
    <p>Rain today</p>
    <p>Hello, world!</p>
    (a) Hello, world! (b) Rain today (c) Good morning! (d) Our school trip
  19. 19.💬 Does the browser show comments on the page? (a) Yes (b) No
  20. 20.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h2> or <h1>? (a) <h1> (b) <h5> (c) <h4> (d) <h2>
  21. 21.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="250">
    (a) The full moon (b) fort.jpg (c) bus.jpg (d) moon.png
  22. 22.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Roses are red</p>
  23. 23.🔗 Which words do you click on?
    <a href="maths.html">Art corner</a>
    (a) maths.html (b) School news (c) href (d) Art corner
  24. 24.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h6> or <h5>? (a) <h1> (b) <h5> (c) <h6> (d) <h4>
  25. 25.🌐 Which one hosts websites online? (a) a code editor (b) a web server (c) a web browser
  26. 26.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="50">
    (a) moon.png (b) A happy dog (c) dog.jpg (d) bus.jpg
  27. 27.True or false: in <img>, alt names the picture file. (a) False (b) True
  28. 28.📋 What number does the browser show next to “Mango”?
    <ol>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Guava</li>
      <li>Banana</li>
    </ol>
  29. 29.📝 What does <p> make? (a) a link (b) a table (c) a picture (d) a paragraph
  30. 30.🖼️ Which attribute of <img> tells which image to load? (a) src (b) width (c) height (d) alt
  31. 31.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h3> or <h4>? (a) <h4> (b) <h5> (c) <h3> (d) <h2>
  32. 32.🔍 Which line is missing its closing tag?
    line 1: <h1>My pets</h1>
    line 2: <small>The red kite</small>
    line 3: <b>Cricket is fun.
    (a) line 1 (b) line 3 (c) line 2
  33. 33.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Kites fly high<br>Roses are red<br>Sky is blue<br>Birds sing</p>
  34. 34.📋 Which list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <ul> (d) <br>
  35. 35.🔍 Which line is missing its closing tag?
    line 1: <h2>Good morning!</h2>
    line 2: <u>Our school trip</u>
    line 3: <p>The red kite
    (a) line 1 (b) line 3 (c) line 2
  36. 36.📄 Can HTML on its own make links to pages? (a) No (b) Yes
  37. 37.🏷️ Is </b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  38. 38.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h3>Good morning!</h3>
    <h2>I love mangoes.</h2>
    <h3>Our school trip</h3>
    <p>Cricket is fun.</p>
  39. 39.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 3 (c) 1 (d) 6
  40. 40.🔠 Are headings shown in bold by default? (a) No (b) Yes

Answer key

  1. 2
  2. A red kite
  3. Yes
  4. line 1
  5. Yes
  6. line 3
  7. width
  8. My best friend
  9. 4
  10. My pets
  11. 4
  12. 3
  13. False
  14. A red kite
  15. a code editor
  16. line 1
  17. <h5>
  18. Good morning!
  19. No
  20. <h1>
  21. moon.png
  22. 2
  23. Art corner
  24. <h1>
  25. a web server
  26. dog.jpg
  27. False
  28. 2
  29. a paragraph
  30. src
  31. <h5>
  32. line 3
  33. 5
  34. <ul>
  35. line 3
  36. Yes
  37. a closing tag
  38. 4
  39. 1
  40. Yes

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