← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 794 · 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.✍️ What value is given to background-color in this rule?
    body {
      font-size: 20px;
      background-color: yellow;
      text-align: center;
    }
    (a) 8px (b) background-color (c) yellow (d) 10px
  2. 2.🖼️ Which attribute of <img> describes the picture? (a) height (b) alt (c) width (d) src
  3. 3.📊 How many rows does this table have?
    <table>
      <tr><td>Papaya</td><td>Grapes</td><td>Guava</td><td>Guava</td></tr>
      <tr><td>Orange</td><td>Guava</td><td>Banana</td><td>Guava</td></tr>
      <tr><td>Orange</td><td>Banana</td><td>Grapes</td><td>Litchi</td></tr>
    </table>
  4. 4.Which of these is an opening tag? (a) </p> (b) </h1> (c) <h1> (d) </b>
  5. 5.🔁 Which loop repeats code a set number of times? (a) let (b) else (c) if (d) for
  6. 6.🌍 What is the protocol in this URL?
    http://www.example.net/news/today.html
    (a) /news/today.html (b) www.example.net (c) http (d) https
  7. 7.What is <input type="checkbox"> for? (a) sends the form (b) hides what you type (c) is for one line of words (d) lets you tick many
  8. 8.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 60px;
      padding: 5px;
      border: 2px solid black;
      margin: 0px;
    }
  9. 9.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Stars shine<br>Rivers flow</p>
  10. 10.✍️ How many declarations (property: value pairs) are in this rule?
    .note {
      color: red;
    }
  11. 11.🔁 Which word runs code only when something is true? (a) log (b) let (c) if (d) for
  12. 12.🌍 What is the path in this URL?
    http://learn.example.com/about.html
    (a) learn.example.com (b) /about.html (c) /maths/tables.html (d) http
  13. 13.🌍 What is the protocol in this URL?
    http://learn.example.com/games/chess.html
    (a) /games/chess.html (b) learn.example.com (c) http (d) https
  14. 14.Which of these is a strong password? (a) Mango#Kite29! (b) riya2014 (c) password (d) 123456
  15. 15.What is <input type="text"> for? (a) lets you pick only one (b) is for one line of words (c) is for an email address (d) takes only numbers
  16. 16.🔁 When does the else part run? (a) when if is false (b) when if is true (c) always (d) never
  17. 17.Which of these is the content? (a) space inside the border (b) the text or picture (c) a solid or dotted edge (d) the gap to other boxes
  18. 18.⚡ What number does this code print?
    let a = 5;
    let b = 2;
    console.log(a - b);
  19. 19.⚖️ Which selector is the strongest? (a) an id selector (b) an element selector (c) a class selector
  20. 20.📱 The screen is 540px wide. Does the rule inside @media apply?
    p {
      font-size: 20px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 18px;
      }
    }
    (a) Yes (b) No
  21. 21.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ol> (c) <ul>
  22. 22.⚡ Which word makes a new variable? (a) give (b) make (c) let (d) put
  23. 23.🚀 Where in index.html does the link to style.css go? (a) inside a <p> (b) in the footer (c) after </html> (d) in the head
  24. 24.True or false: a code editor hosts websites online. (a) False (b) True
  25. 25.🔢 When you open a web page, what comes right after “you type the URL”? (a) the browser asks it (b) DNS finds the server (c) the browser shows it (d) the server sends files
  26. 26.Which of these is an empty tag? (a) <title> (b) <meta> (c) <ul> (d) <p>
  27. 27.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  28. 28.✍️ Which sign ends each CSS declaration? (a) , (b) . (c) ; (d) :
  29. 29.♿ A part of the page is under a <h2> heading. Which tag should its sub-heading use? (a) <h6> (b) <h3> (c) <h4> (d) <h5>
  30. 30.📊 Which tag makes a heading cell? (a) <table> (b) <caption> (c) <th> (d) <tr>
  31. 31.🔒 Is the connection to this address scrambled (encrypted)?
    http://learn.example.com/games/chess.html
    (a) No (b) Yes
  32. 32.True or false: <input type="submit"> sends the form. (a) True (b) False
  33. 33.🌈 In #004700 the green part is the hex number 47. What is it as a normal number?
  34. 34.🔍 Which is the odd one out? (a) puts a picture on a page (b) makes headings and lists (c) shows a pop-up message (d) gives the page structure
  35. 35.True or false: <li> shows bullet points. (a) True (b) False
  36. 36.📱 What does a media query check? (a) the screen width (b) the page title (c) the battery level (d) the time of day
  37. 37.What does justify-content: flex-end do? (a) packs boxes at the end (b) equal gaps, none at ends (c) packs boxes at the start (d) puts boxes in the middle
  38. 38.🚀 Which file should this code go in: .box { padding: 8px; } (a) style.css (b) script.js (c) index.html
  39. 39.Which of these is a weak password? (a) 123456 (b) S0lar!Pen#8 (c) Mango#Kite29! (d) Chai$Cup_19x
  40. 40.♿ Is this heading order correct (no level skipped)?
    <h1> → <h1> → <h2> → <h2>
    (a) Yes (b) No

Answer key

  1. yellow
  2. alt
  3. 3
  4. <h1>
  5. for
  6. http
  7. lets you tick many
  8. 74
  9. 3
  10. 1
  11. if
  12. /about.html
  13. http
  14. Mango#Kite29!
  15. is for one line of words
  16. when if is false
  17. the text or picture
  18. 3
  19. an id selector
  20. Yes
  21. <ol>
  22. let
  23. in the head
  24. False
  25. DNS finds the server
  26. <meta>
  27. No
  28. ;
  29. <h3>
  30. <th>
  31. No
  32. True
  33. 71
  34. shows a pop-up message
  35. False
  36. the screen width
  37. packs boxes at the end
  38. style.css
  39. 123456
  40. Yes

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