← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 750 · 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.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Birds sing<br>Roses are red</p>
  2. 2.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h1> or <h4>? (a) <h1> (b) <h3> (c) <h4> (d) <h5>
  3. 3.🔍 Which is the odd one out? (a) shows line numbers (b) saves our .html files (c) opens web pages for us (d) colours code to help us
  4. 4.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Papaya</li>
      <li>Orange</li>
      <li>Banana</li>
      <li>Guava</li>
      <li>Mango</li>
    </ol>
  5. 5.🌐 Which one has an address bar? (a) a code editor (b) a web server (c) a web browser
  6. 6.💬 How does an HTML comment start? (a) // (b) <!-- (c) # (d) /*
  7. 7.🔠 Which tag is the least important heading? (a) <h6> (b) <h1> (c) <p> (d) <h3>
  8. 8.📄 What is the first line of an HTML5 page? (a) <body> (b) <head> (c) <!DOCTYPE html> (d) <html>
  9. 9.💬 How does an HTML comment end? (a) --> (b) // (c) >> (d) */
  10. 10.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="50">
    (a) width (b) Birthday cake (c) map.png (d) Map of India
  11. 11.True or false: a web server is where we type code. (a) False (b) True
  12. 12.True or false: <ul> lists steps in order. (a) True (b) False
  13. 13.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="300">
  14. 14.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  15. 15.Which of these is true of a code editor? (a) turns HTML into a page (b) opens web pages for us (c) sends pages over the net (d) saves our .html files
  16. 16.📋 Which list tag goes inside ul or ol? (a) <ol> (b) <ul> (c) <li>
  17. 17.🔍 One closing tag is missing. Which one?
    <h2>I love mangoes.
    <strong>My best friend</strong>
    <b>Cricket is fun.</b>
    (a) </h2> (b) </b> (c) </strong> (d) </h3>
  18. 18.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
  19. 19.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  20. 20.🌐 Which one sends pages over the net? (a) a web server (b) a code editor (c) a web browser
  21. 21.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>My best friend</p>
    <p>I love mangoes.</p>
    (a) My best friend (b) I love mangoes. (c) Hello, world!
  22. 22.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="250">
  23. 23.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it bold (c) makes it blank (d) hides the link
  24. 24.🔗 Where does this link open?
    <a href="games.html">Visit the site</a>
    (a) in the same tab (b) in a new tab
  25. 25.True or false: in <img>, alt tells which image to load. (a) False (b) True
  26. 26.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a alt="about.html"> (c) <link about.html> (d) <a href="about.html">
  27. 27.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ol> (c) <br> (d) <ul>
  28. 28.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) My drawings (b) Here is my best one. (c) Class 7 Blog (d) index.html
  29. 29.📋 What number does the browser show next to “Banana”?
    <ol start="5">
      <li>Grapes</li>
      <li>Banana</li>
      <li>Guava</li>
      <li>Jamun</li>
    </ol>
  30. 30.True or false: <br> has a closing tag. (a) False (b) True
  31. 31.🔍 Which is the odd one out? (a) shows pages from the web (b) opens web pages for us (c) saves our .html files (d) turns HTML into a page
  32. 32.True or false: in <img>, src names the picture file. (a) False (b) True
  33. 33.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <!-- <p>Rain today</p> -->
    <p>Hello, world!</p>
    <!-- <p>My pets</p> -->
    <!-- <p>I love mangoes.</p> -->
  34. 34.True or false: <h1> goes in the head. (a) False (b) True
  35. 35.Which of these is an empty tag? (a) <br> (b) <b> (c) <li> (d) <title>
  36. 36.True or false: a web server has an address bar. (a) False (b) True
  37. 37.🔍 Which line is missing its closing tag?
    line 1: <small>The red kite</small>
    line 2: <u>Cricket is fun.</u>
    line 3: <b>My best friend
    (a) line 1 (b) line 3 (c) line 2
  38. 38.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <p>Hello, world!</p>
    <p>Good morning!</p>
    <!-- <p>The red kite</p> -->
    (a) Good morning! (b) Rain today (c) The red kite (d) Hello, world!
  39. 39.Which of these has a closing tag? (a) <br> (b) <img> (c) <b> (d) <hr>
  40. 40.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Birds sing<br>Stars shine</p>

Answer key

  1. 3
  2. <h5>
  3. opens web pages for us
  4. 6
  5. a web browser
  6. <!--
  7. <h6>
  8. <!DOCTYPE html>
  9. -->
  10. Map of India
  11. False
  12. False
  13. 300
  14. Yes
  15. saves our .html files
  16. <li>
  17. </h2>
  18. No
  19. an opening tag
  20. a web server
  21. Hello, world!
  22. 250
  23. opens it in a new tab
  24. in the same tab
  25. False
  26. <a href="about.html">
  27. <ul>
  28. Class 7 Blog
  29. 6
  30. False
  31. saves our .html files
  32. True
  33. 1
  34. False
  35. <br>
  36. False
  37. line 3
  38. The red kite
  39. <b>
  40. 3

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