← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 681 · 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.🏷️ Which is the closing tag for <h1>? (a) <\h1> (b) <h1/> (c) </h1> (d) <h1>
  2. 2.🔗 Where does this link open?
    <a href="art.html" target="_blank">About us</a>
    (a) in a new tab (b) in the same tab
  3. 3.🔍 Which is the odd one out? (a) turns HTML into a page (b) has an address bar (c) is where we type code (d) opens web pages for us
  4. 4.🔗 Which words do you click on?
    <a href="about.html">Visit the site</a>
    (a) href (b) Visit the site (c) about.html (d) Maths fun
  5. 5.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) </body> (c) <head> (d) <body>
  6. 6.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 6 (c) 1 (d) 3
  7. 7.🔍 Which is the odd one out? (a) stores a website’s files (b) colours code to help us (c) hosts websites online (d) sends pages over the net
  8. 8.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Kites fly high<br>Stars shine<br>Birds sing</p>
  9. 9.True or false: <title> goes in the body. (a) True (b) False
  10. 10.Which of these goes in the head? (a) <h1> (b) <a> (c) <meta charset="utf-8"> (d) <img>
  11. 11.🔗 Which tag makes a clickable link? (a) <a> (b) <link> (c) <p> (d) <img>
  12. 12.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<body>”? (a) <body> (b) <!DOCTYPE html>
  13. 13.True or false: in <img>, width sets how wide it is. (a) False (b) True
  14. 14.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to load it faster (c) to make it bigger (d) to colour it
  15. 15.🔠 Are headings shown in bold by default? (a) Yes (b) No
  16. 16.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="100">
  17. 17.Which of these goes in the head? (a) <link rel="stylesheet"> (b) <ul> (c) <a> (d) <h1>
  18. 18.🔗 Which words do you click on?
    <a href="art.html">Visit the site</a>
    (a) href (b) art.html (c) Maths fun (d) Visit the site
  19. 19.🌐 Which one shows pages from the web? (a) a web server (b) a web browser (c) a code editor
  20. 20.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
  21. 21.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>Our school trip</p>
  22. 22.💾 A web page file usually ends with which extension? (a) .png (b) .txt (c) .html (d) .mp3
  23. 23.💬 Does the browser show comments on the page? (a) Yes (b) No
  24. 24.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h4> or <h2>? (a) <h1> (b) <h3> (c) <h2> (d) <h4>
  25. 25.Which of these is true of a code editor? (a) turns HTML into a page (b) has an address bar (c) hosts websites online (d) saves our .html files
  26. 26.True or false: in <img>, alt sets how wide it is. (a) True (b) False
  27. 27.🔍 Which line is missing its closing tag?
    line 1: <em>Fun facts</em>
    line 2: <h3>The red kite
    line 3: <strong>Rain today</strong>
    (a) line 3 (b) line 1 (c) line 2
  28. 28.🔗 Where does this link open?
    <a href="about.html" target="_blank">Art corner</a>
    (a) in the same tab (b) in a new tab
  29. 29.📋 What number does the browser show next to “Orange”?
    <ol>
      <li>Jamun</li>
      <li>Orange</li>
      <li>Mango</li>
    </ol>
  30. 30.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="100">
    (a) A red kite (b) width (c) tiger.jpg (d) A tiger asleep
  31. 31.Which of these is true of a web server? (a) has an address bar (b) turns HTML into a page (c) stores a website’s files (d) saves our .html files
  32. 32.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="100">
    (a) moon.png (b) fort.jpg (c) The full moon (d) bus.jpg
  33. 33.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) body (b) My Hobbies (c) Thanks for visiting. (d) Welcome!
  34. 34.Which of these is an opening tag? (a) </body> (b) </b> (c) </title> (d) <p>
  35. 35.🖼️ Which tag puts a picture on a page? (a) <p> (b) <img> (c) <pic> (d) <a>
  36. 36.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Thanks for visiting. (b) All about me (c) Class 7 Blog (d) index.html
  37. 37.True or false: <title> goes in the head. (a) False (b) True
  38. 38.🏷️ Every HTML tag starts with which sign? (a) [ (b) { (c) < (d) (
  39. 39.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Good morning!</p> -->
    <p>The red kite</p>
    <p>Cricket is fun.</p>
    <!-- <p>My best friend</p> -->
  40. 40.📄 Can HTML on its own make headings? (a) No (b) Yes

Answer key

  1. </h1>
  2. in a new tab
  3. is where we type code
  4. Visit the site
  5. <!DOCTYPE html>
  6. 1
  7. colours code to help us
  8. 4
  9. False
  10. <meta charset="utf-8">
  11. <a>
  12. <!DOCTYPE html>
  13. True
  14. to describe the image
  15. Yes
  16. 100
  17. <link rel="stylesheet">
  18. Visit the site
  19. a web browser
  20. 1
  21. 2
  22. .html
  23. No
  24. <h1>
  25. saves our .html files
  26. False
  27. line 2
  28. in a new tab
  29. 2
  30. A tiger asleep
  31. stores a website’s files
  32. moon.png
  33. Welcome!
  34. <p>
  35. <img>
  36. Class 7 Blog
  37. True
  38. <
  39. 3
  40. Yes

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