← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 412 · 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.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) opens it in a new tab (d) makes it blank
  2. 2.Which of these is true of a web browser? (a) is where we type code (b) stores a website’s files (c) sends pages over the net (d) shows pages from the web
  3. 3.🔠 How many heading levels does HTML have? (a) 6 (b) 4 (c) 3 (d) 10
  4. 4.Which of these is an opening tag? (a) </h1> (b) </b> (c) </li> (d) <li>
  5. 5.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Rivers flow<br>Stars shine<br>Kites fly high</p>
  6. 6.True or false: <ol> goes inside ul or ol. (a) False (b) True
  7. 7.🏷️ Which is the closing tag for <strong>? (a) <strong> (b) </strong> (c) <\strong> (d) <strong/>
  8. 8.🔗 Where does this link open?
    <a href="quiz.html">Visit the site</a>
    (a) in a new tab (b) in the same tab
  9. 9.📄 Which part holds everything you see on the page? (a) the doctype (b) the head (c) the body (d) the title
  10. 10.🌐 Which one hosts websites online? (a) a web browser (b) a web server (c) a code editor
  11. 11.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  12. 12.📋 Which list tag is an unordered list? (a) <li> (b) <ol> (c) <ul>
  13. 13.💬 Why do coders write comments? (a) to leave notes (b) to show pictures (c) to add colour (d) to make links
  14. 14.🔠 Which heading shows the SMALLEST text: <h6>, <h2>, <h5> or <h4>? (a) <h6> (b) <h2> (c) <h5> (d) <h4>
  15. 15.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <h3>Our school trip</h3>
    <p>Cricket is fun.</p>
    <p>Hello, world!</p>
  16. 16.Which of these is true of a code editor? (a) hosts websites online (b) sends pages over the net (c) is where we type code (d) answers page requests
  17. 17.🔢 In a basic web page file, which comes first: “<body>” or “<head>”? (a) <body> (b) <head>
  18. 18.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="350">
    (a) tiger.jpg (b) A tiger asleep (c) A red kite (d) width
  19. 19.🌐 Which one shows line numbers? (a) a web browser (b) a code editor (c) a web server
  20. 20.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="300">
    (a) An old fort (b) A tiger asleep (c) width (d) fort.jpg
  21. 21.📋 What number does the browser show next to “Banana”?
    <ol start="9">
      <li>Jamun</li>
      <li>Banana</li>
      <li>Grapes</li>
      <li>Orange</li>
      <li>Guava</li>
    </ol>
  22. 22.🌐 Which one answers page requests? (a) a web server (b) a code editor (c) a web browser
  23. 23.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  24. 24.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="250">
    (a) bus.jpg (b) fort.jpg (c) moon.png (d) The full moon
  25. 25.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
  26. 26.🔗 Which address opens when you click this link?
    <a href="art.html">Contact us</a>
    (a) quiz.html (b) Contact us (c) news.html (d) art.html
  27. 27.Which of these is a closing tag? (a) <p> (b) </p> (c) <h1> (d) <body>
  28. 28.💬 Which text will NOT show on the page?
    <!-- <p>The red kite</p> -->
    <p>Cricket is fun.</p>
    <p>Hello, world!</p>
    (a) Hello, world! (b) Cricket is fun. (c) The red kite
  29. 29.True or false: HTML on its own can run a game loop. (a) False (b) True
  30. 30.📋 Which list tag shows bullet points? (a) <ul> (b) <ol> (c) <li>
  31. 31.🔗 Where does this link open?
    <a href="contact.html">About us</a>
    (a) in a new tab (b) in the same tab
  32. 32.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h5> or <h4>? (a) <h5> (b) <h2> (c) <h6> (d) <h4>
  33. 33.📝 Does <input> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  34. 34.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <h2>Cricket is fun.</h2>
    <h2>Our school trip</h2>
    <h4>My best friend</h4>
    <p>I love mangoes.</p>
  35. 35.🔗 Which address opens when you click this link?
    <a href="about.html">Maths fun</a>
    (a) https://example.com (b) Maths fun (c) about.html (d) contact.html
  36. 36.True or false: a web browser sends pages over the net. (a) True (b) False
  37. 37.🔍 Which is the odd one out? (a) turns HTML into a page (b) shows pages from the web (c) saves our .html files (d) opens web pages for us
  38. 38.🏷️ Every HTML tag starts with which sign? (a) { (b) ( (c) [ (d) <
  39. 39.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>Cricket is fun.</p>
    <h3>Good morning!</h3>
    <p>My pets</p>
  40. 40.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) attribute (c) editor (d) address

Answer key

  1. opens it in a new tab
  2. shows pages from the web
  3. 6
  4. <li>
  5. 4
  6. False
  7. </strong>
  8. in the same tab
  9. the body
  10. a web server
  11. No
  12. <ul>
  13. to leave notes
  14. <h6>
  15. 2
  16. is where we type code
  17. <head>
  18. A tiger asleep
  19. a code editor
  20. An old fort
  21. 10
  22. a web server
  23. an opening tag
  24. moon.png
  25. Yes
  26. art.html
  27. </p>
  28. The red kite
  29. False
  30. <ul>
  31. in the same tab
  32. <h6>
  33. an empty tag
  34. 4
  35. about.html
  36. False
  37. saves our .html files
  38. <
  39. 2
  40. element

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