← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 588 · 40 questions
TalentJR

Code tip (Read it like a browser): Find the topic: HTML, CSS, JavaScript or how the web works. Read the code line by line, the way a browser would. For sums and loops, write each step down and check it again.

NameDateTime takenScore ___ / 40
  1. 1.🔗 Where does this link open?
    <a href="art.html">Maths fun</a>
    (a) in a new tab (b) in the same tab
  2. 2.💬 Which text will NOT show on the page?
    <!-- <p>Our school trip</p> -->
    <p>My pets</p>
    <p>I love mangoes.</p>
    (a) My pets (b) I love mangoes. (c) Our school trip
  3. 3.⚖️ What colour is the text of this element?
    <p class="box" id="hero">Hi</p>
    CSS:
    #hero { color: red; }
    #hero { color: green; }
    (a) orange (b) green (c) red (d) purple
  4. 4.📝 What does <p> make? (a) a table (b) a link (c) a picture (d) a paragraph
  5. 5.📋 Which tag goes around each item of a list? (a) <ol> (b) <li> (c) <ul> (d) <p>
  6. 6.True or false: <ul> goes in the head. (a) True (b) False
  7. 7.True or false: the server stores the site’s files. (a) False (b) True
  8. 8.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="400">
  9. 9.Which of these is safe to do online? (a) type a password on http (b) click prize links (c) put secrets in comments (d) use a nickname in games
  10. 10.📋 What number does the browser show next to “Jamun”?
    <ol>
      <li>Banana</li>
      <li>Mango</li>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Orange</li>
    </ol>
  11. 11.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) height (c) alt (d) width
  12. 12.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) index.html (b) My Hobbies (c) Welcome! (d) We won by 5 runs.
  13. 13.✍️ What value is given to margin in this rule?
    li {
      text-align: center;
      font-size: 20px;
      margin: 10px;
      width: 300px;
    }
    (a) bold (b) 10px (c) margin (d) 8px
  14. 14.True or false: <h1> has a closing tag. (a) True (b) False
  15. 15.📱 What does a media query check? (a) the page title (b) the time of day (c) the screen width (d) the battery level
  16. 16.♿ A part of the page is under a <h4> heading. Which tag should its sub-heading use? (a) <h1> (b) <h2> (c) <h6> (d) <h5>
  17. 17.🖌️ Where does the text sit on its line?
    p {
      font-size: 12px;
      background-color: blue;
      text-align: left;
      color: orange;
    }
    (a) on the left (b) on the right (c) in the middle
  18. 18.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as a dot (c) as a new line (d) as 5 spaces
  19. 19.True or false: HTML on its own can show paragraphs. (a) False (b) True
  20. 20.📦 In the box model, which part is space outside the border? (a) border (b) margin (c) content (d) padding
  21. 21.Which of these does JavaScript do? (a) makes headings and lists (b) shows a pop-up message (c) lays out the page (d) changes the text size
  22. 22.Which of these is not safe to do online? (a) use a strong password (b) use a nickname in games (c) put secrets in comments (d) think before you post
  23. 23.True or false: <input type="date"> is for an email address. (a) False (b) True
  24. 24.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <!-- <p>Good morning!</p> -->
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    <p>Our school trip</p>
  25. 25.Which of these is safe to do online? (a) post your home address (b) type a password on http (c) use a strong password (d) share your OTP
  26. 26.📝 Which tag makes a big box for many lines of text? (a) <br> (b) <input> (c) <textarea> (d) <p>
  27. 27.📱 The screen is 1100px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (min-width: 480px) {
      p {
        font-size: 18px;
      }
    }
    (a) No (b) Yes
  28. 28.⚡ What number does this code print?
    let a = 30;
    let b = 36;
    console.log(a + b);
  29. 29.📝 Does <title> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  30. 30.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 140px;
      justify-content: center;
    }
    Inside are 2 boxes, each 40px wide (no margins).
  31. 31.🔗 Which words do you click on?
    <a href="maths.html">School news</a>
    (a) School news (b) Take the quiz (c) href (d) maths.html
  32. 32.🌍 What is the protocol in this URL?
    http://www.example.net/games/chess.html
    (a) https (b) /games/chess.html (c) http (d) www.example.net
  33. 33.🔠 Are headings shown in bold by default? (a) Yes (b) No
  34. 34.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h4> or <h6>? (a) <h1> (b) <h4> (c) <h2> (d) <h6>
  35. 35.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <p> (c) <a> (d) <img>
  36. 36.📝 Which input type is for one line of words? (a) number (b) text (c) date (d) checkbox
  37. 37.🔍 One closing tag is missing. Which one?
    <u>Our school trip</u>
    <em>My pets</em>
    <h2>My best friend
    (a) </em> (b) </h2> (c) </p> (d) </u>
  38. 38.📱 Which tag helps phones show a page at the right size? (a) the br tag (b) the title tag (c) the viewport meta tag (d) the hr tag
  39. 39.🖌️ Which CSS property centres a heading? (a) font-size (b) color (c) font-weight (d) text-align
  40. 40.🎨 A CSS file usually ends with which extension? (a) .html (b) .js (c) .png (d) .css

Answer key

  1. in the same tab
  2. Our school trip
  3. green
  4. a paragraph
  5. <li>
  6. False
  7. True
  8. 400
  9. use a nickname in games
  10. 4
  11. alt
  12. My Hobbies
  13. 10px
  14. True
  15. the screen width
  16. <h5>
  17. on the left
  18. as one space
  19. True
  20. margin
  21. shows a pop-up message
  22. put secrets in comments
  23. False
  24. 4
  25. use a strong password
  26. <textarea>
  27. Yes
  28. 66
  29. has a closing tag
  30. 30
  31. School news
  32. http
  33. Yes
  34. <h1>
  35. <img>
  36. text
  37. </h2>
  38. the viewport meta tag
  39. text-align
  40. .css

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