← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 264 · 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 one colours code to help us? (a) a code editor (b) a web browser (c) a web server
  2. 2.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <!-- <p>My best friend</p> -->
    <p>Hello, world!</p>
    (a) Hello, world! (b) The red kite (c) My best friend
  3. 3.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <!-- <p>My pets</p> -->
    <!-- <p>Fun facts</p> -->
  4. 4.True or false: in <img>, alt describes the picture. (a) True (b) False
  5. 5.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="50">
    (a) A tiger asleep (b) width (c) tiger.jpg (d) A red kite
  6. 6.📄 What is the first line of an HTML5 page? (a) <html> (b) <head> (c) <body> (d) <!DOCTYPE html>
  7. 7.🧱 HTML gives a web page its ___. (a) speed (b) structure (c) sound (d) colours
  8. 8.💾 A web page file usually ends with which extension? (a) .png (b) .mp3 (c) .txt (d) .html
  9. 9.True or false: HTML on its own can make links to pages. (a) True (b) False
  10. 10.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h1> or <h3>? (a) <h5> (b) <h2> (c) <h3> (d) <h1>
  11. 11.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>My pets</p>
    <!-- <p>Rain today</p> -->
    <!-- <p>Hello, world!</p> -->
  12. 12.🔗 Which words do you click on?
    <a href="about.html">Take the quiz</a>
    (a) Play games (b) Take the quiz (c) about.html (d) href
  13. 13.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  14. 14.Which of these is true of a web browser? (a) is where we type code (b) has an address bar (c) shows line numbers (d) saves our .html files
  15. 15.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <!-- <p>Hello, world!</p> -->
    <p>My pets</p>
  16. 16.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h3> or <h5>? (a) <h3> (b) <h1> (c) <h2> (d) <h5>
  17. 17.📋 Which list tag shows bullet points? (a) <ol> (b) <li> (c) <ul>
  18. 18.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it blank (c) makes it bold (d) hides the link
  19. 19.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  20. 20.🔗 Where does this link open?
    <a href="art.html">Take the quiz</a>
    (a) in a new tab (b) in the same tab
  21. 21.💬 Why do coders write comments? (a) to add colour (b) to leave notes (c) to make links (d) to show pictures
  22. 22.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <p>I love mangoes.</p>
    <!-- <p>My best friend</p> -->
  23. 23.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a src="about.html">
  24. 24.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
    <!-- <p>The red kite</p> -->
  25. 25.🔗 Which address opens when you click this link?
    <a href="maths.html">Visit the site</a>
    (a) Visit the site (b) art.html (c) news.html (d) maths.html
  26. 26.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Kites fly high<br>Sky is blue</p>
  27. 27.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>My best friend</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Hello, world!</p>
    (a) My best friend (b) I love mangoes. (c) Hello, world! (d) Good morning!
  28. 28.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <!-- <p>Good morning!</p> -->
    <p>My pets</p>
    <p>Fun facts</p>
  29. 29.🔗 Which words do you click on?
    <a href="https://example.com">Art corner</a>
    (a) https://example.com (b) Art corner (c) School news (d) href
  30. 30.True or false: HTML on its own cannot run a game loop. (a) False (b) True
  31. 31.📋 What number does the browser show next to “Orange”?
    <ol>
      <li>Guava</li>
      <li>Orange</li>
      <li>Mango</li>
      <li>Jamun</li>
      <li>Papaya</li>
    </ol>
  32. 32.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>I love mangoes.</p>
    <p>Rain today</p>
    <h2>My best friend</h2>
    <h2>Hello, world!</h2>
  33. 33.🔍 Which line is missing its closing tag?
    line 1: <h3>Cricket is fun.</h3>
    line 2: <p>My pets</p>
    line 3: <h1>The red kite
    (a) line 2 (b) line 3 (c) line 1
  34. 34.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h5> or <h2>? (a) <h3> (b) <h4> (c) <h5> (d) <h2>
  35. 35.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h6> or <h4>? (a) <h5> (b) <h6> (c) <h4> (d) <h1>
  36. 36.Which of these is true of a web browser? (a) sends pages over the net (b) hosts websites online (c) turns HTML into a page (d) stores a website’s files
  37. 37.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <p>Our school trip</p>
    <!-- <p>The red kite</p> -->
    <p>Cricket is fun.</p>
    (a) Our school trip (b) Rain today (c) Cricket is fun. (d) The red kite
  38. 38.🏷️ Which is the closing tag for <small>? (a) </small> (b) <\small> (c) <small/> (d) <small>
  39. 39.💬 How does an HTML comment end? (a) // (b) >> (c) --> (d) */
  40. 40.True or false: <p> has a closing tag. (a) True (b) False

Answer key

  1. a code editor
  2. My best friend
  3. 1
  4. True
  5. A tiger asleep
  6. <!DOCTYPE html>
  7. structure
  8. .html
  9. True
  10. <h1>
  11. 2
  12. Take the quiz
  13. has a closing tag
  14. has an address bar
  15. 1
  16. <h5>
  17. <ul>
  18. opens it in a new tab
  19. an opening tag
  20. in the same tab
  21. to leave notes
  22. 2
  23. <a href="about.html">
  24. 2
  25. maths.html
  26. 3
  27. I love mangoes.
  28. 2
  29. Art corner
  30. True
  31. 2
  32. 3
  33. line 3
  34. <h5>
  35. <h6>
  36. turns HTML into a page
  37. The red kite
  38. </small>
  39. -->
  40. True

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