← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 797 · 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.📊 Are <th> cells shown bold and centred by default? (a) No (b) Yes
  2. 2.✍️ CSS declarations go inside which brackets? (a) [ ] (b) { } (c) ( ) (d) < >
  3. 3.Which of these is true of a code editor? (a) answers page requests (b) saves our .html files (c) sends pages over the net (d) hosts websites online
  4. 4.🖌️ What colour are the letters?
    h2 {
      background-color: purple;
      color: green;
      font-size: 28px;
      text-align: right;
    }
    (a) black (b) green (c) purple
  5. 5.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
  6. 6.Which of these is the border? (a) space inside the border (b) the text or picture (c) the gap to other boxes (d) the line round the box
  7. 7.🚀 Which file should this code go in: score = score + 1; (a) script.js (b) style.css (c) index.html
  8. 8.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h2>The red kite</h2>
    <h2>Cricket is fun.</h2>
    <h2>Hello, world!</h2>
  9. 9.Which of these is the content? (a) the text or picture (b) a solid or dotted edge (c) space outside the border (d) the gap to other boxes
  10. 10.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 240px;
      padding: 30px;
      border: 4px solid black;
      margin: 20px;
    }
  11. 11.🔗 Which address opens when you click this link?
    <a href="news.html">Play games</a>
    (a) games.html (b) Play games (c) news.html (d) quiz.html
  12. 12.🔗 What does HyperText mean? (a) text in colour (b) very big text (c) secret text (d) text with links
  13. 13.Which of these is not safe to do online? (a) use a strong password (b) click prize links (c) tell a trusted adult (d) ask before downloading
  14. 14.📦 In the box model, which part is space inside the border? (a) content (b) padding (c) margin (d) border
  15. 15.🖌️ What colour are the letters?
    h2 {
      font-size: 40px;
      color: blue;
      background-color: red;
      text-align: right;
    }
    (a) red (b) black (c) blue
  16. 16.🎯 Which CSS selector matches this element?
    <div class="box" id="end">Hello</div>
    (a) .end (b) .star (c) .box (d) #hero
  17. 17.🚀 Which file should this code go in: <img src="cat.png"> (a) script.js (b) index.html (c) style.css
  18. 18.⚡ What number does this code print?
    let apples = 23;
    apples = apples + 13;
    apples = apples - 25;
    console.log(apples);
  19. 19.⚡ Which JavaScript word runs code when true? (a) let (b) console.log() (c) alert() (d) if
  20. 20.What does justify-content: center do? (a) packs boxes at the start (b) equal gaps, none at ends (c) puts boxes in the middle (d) packs boxes at the end
  21. 21.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a src="about.html"> (c) <a alt="about.html"> (d) <link about.html>
  22. 22.🎯 What kind of selector is .big? (a) an id selector (b) an element selector (c) a class selector
  23. 23.✍️ What is the selector in this CSS rule?
    .note {
      font-size: 20px;
      padding: 8px;
    }
    (a) #top (b) font-size (c) 8px (d) .note
  24. 24.🌗 Is white on dark blue easy or hard to read? (a) easy to read (b) hard to read
  25. 25.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  26. 26.⚖️ Which selector is the weakest? (a) an element selector (b) an id selector (c) a class selector
  27. 27.What is <input type="checkbox"> for? (a) hides what you type (b) sends the form (c) picks a day (d) lets you tick many
  28. 28.✍️ How many declarations (property: value pairs) are in this rule?
    p {
      text-align: center;
    }
  29. 29.True or false: .note is a class selector. (a) True (b) False
  30. 30.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <h2>Good morning!</h2>
    <h2>Our school trip</h2>
  31. 31.Which of these is an opening tag? (a) </p> (b) </body> (c) <body> (d) </title>
  32. 32.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="150">
  33. 33.True or false: HTTPS shows the page to you. (a) True (b) False
  34. 34.💪 Which justify-content value puts boxes in the middle? (a) space-between (b) flex-start (c) center (d) flex-end
  35. 35.🔍 Which is the odd one out? (a) shows line numbers (b) is where we type code (c) colours code to help us (d) hosts websites online
  36. 36.🧭 Why use <nav> instead of <div> for a menu? (a) it adds pictures (b) it tells its meaning (c) it makes text red (d) it loads faster
  37. 37.🔒 Is the connection to this address scrambled (encrypted)?
    http://learn.example.com/maths/tables.html
    (a) Yes (b) No
  38. 38.💬 Which text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>The red kite</p>
    <p>Rain today</p>
    (a) The red kite (b) Rain today (c) My pets
  39. 39.True or false: <img src="cat.png"> goes in index.html. (a) False (b) True
  40. 40.📱 The screen is 375px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 10px;
      }
    }
    (a) Yes (b) No

Answer key

  1. Yes
  2. { }
  3. saves our .html files
  4. green
  5. in the head
  6. the line round the box
  7. script.js
  8. 4
  9. the text or picture
  10. 308
  11. news.html
  12. text with links
  13. click prize links
  14. padding
  15. blue
  16. .box
  17. index.html
  18. 11
  19. if
  20. puts boxes in the middle
  21. <a href="about.html">
  22. a class selector
  23. .note
  24. easy to read
  25. Yes
  26. an element selector
  27. lets you tick many
  28. 1
  29. True
  30. 1
  31. <body>
  32. 150
  33. False
  34. center
  35. hosts websites online
  36. it tells its meaning
  37. No
  38. My pets
  39. True
  40. Yes

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