← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 416 · 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.Which of these is safe to do online? (a) post your home address (b) share your password (c) ask before downloading (d) put secrets in comments
  2. 2.✍️ In color: blue; which part is the value? (a) color (b) blue (c) : (d) ;
  3. 3.📱 What does a media query check? (a) the time of day (b) the page title (c) the battery level (d) the screen width
  4. 4.Which of these is true of a web browser? (a) is where we type code (b) saves our .html files (c) colours code to help us (d) turns HTML into a page
  5. 5.✍️ Which property is set to 2px solid in this rule?
    .box {
      font-size: 20px;
      border: 2px solid;
    }
    (a) width (b) 2px solid (c) font-style (d) border
  6. 6.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>My pets</p>
    <p>My best friend</p>
    <p>My pets</p>
  7. 7.True or false: the border is space outside the border. (a) True (b) False
  8. 8.🌍 What is the protocol in this URL?
    http://learn.example.com/index.html
    (a) learn.example.com (b) /index.html (c) https (d) http
  9. 9.📱 min-width: 800px applies when the screen is ___. (a) 800px or narrower (b) exactly 100px (c) turned off (d) 800px or wider
  10. 10.🌈 Which colour is rgb(0, 255, 0)? (a) magenta (b) white (c) red (d) bright green
  11. 11.Which of these is not safe to do online? (a) log out on shared PCs (b) post your home address (c) use a strong password (d) ask before downloading
  12. 12.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h4>Cricket is fun.</h4>
    <p>Cricket is fun.</p>
    <p>My pets</p>
    <h4>Our school trip</h4>
  13. 13.True or false: in <img>, src names the picture file. (a) False (b) True
  14. 14.True or false: <h1> goes in the head. (a) False (b) True
  15. 15.📱 The screen is 820px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 12px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 8px;
      }
    }
  16. 16.🏷️ Which is the closing tag for <h3>? (a) <\h3> (b) </h3> (c) <h3/> (d) <h3>
  17. 17.🔗 Which address opens when you click this link?
    <a href="contact.html">Play games</a>
    (a) Play games (b) https://example.com (c) contact.html (d) maths.html
  18. 18.🌈 Which colour is rgb(0, 0, 0)? (a) blue (b) yellow (c) black (d) white
  19. 19.🔗 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">
  20. 20.True or false: in <img>, height sets how tall it is. (a) False (b) True
  21. 21.🎯 Can many elements share the same class? (a) Yes (b) No
  22. 22.🔢 On a typical page, from top to bottom, which comes LAST? (a) <header> (b) <footer> (c) <nav> (d) <main>
  23. 23.🎯 What kind of selector is body? (a) a class selector (b) an element selector (c) an id selector
  24. 24.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <h2>My pets</h2>
    <h2>My pets</h2>
  25. 25.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 16px;
    }
    @media (min-width: 600px) {
      p {
        font-size: 18px;
      }
    }
  26. 26.🎯 Which CSS selector matches this element?
    <h1 class="big" id="main">Hello</h1>
    (a) .red (b) h2 (c) .big (d) #big
  27. 27.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>Cricket is fun.</p>
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>My pets</p> -->
  28. 28.🌈 Which hex code is cyan? (a) #ffffff (b) #ffff00 (c) #0000ff (d) #00ffff
  29. 29.Which of these is a closing tag? (a) </title> (b) <li> (c) <b> (d) <p>
  30. 30.📱 The screen is 540px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 16px;
    }
    @media (max-width: 768px) {
      p {
        font-size: 14px;
      }
    }
  31. 31.🏷️ Which is the closing tag for <h2>? (a) <h2> (b) <\h2> (c) </h2> (d) <h2/>
  32. 32.📱 The screen is 320px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 24px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 20px;
      }
    }
  33. 33.💬 How does an HTML comment start? (a) // (b) <!-- (c) # (d) /*
  34. 34.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) blue (c) red (d) white
  35. 35.✍️ What value is given to margin in this rule?
    #top {
      font-style: italic;
      margin: 10px;
      width: 300px;
    }
    (a) 10px (b) margin (c) 8px (d) bold
  36. 36.True or false: the content is space outside the border. (a) True (b) False
  37. 37.Which of these is true of <aside>? (a) holds the logo and title (b) holds one blog post (c) holds a side box of tips (d) sits at the bottom
  38. 38.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h5> or <h3>? (a) <h3> (b) <h4> (c) <h1> (d) <h5>
  39. 39.True or false: in <img>, height names the picture file. (a) True (b) False
  40. 40.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the later one (b) the shorter one (c) neither (d) the first one

Answer key

  1. ask before downloading
  2. blue
  3. the screen width
  4. turns HTML into a page
  5. border
  6. 4
  7. False
  8. http
  9. 800px or wider
  10. bright green
  11. post your home address
  12. 3
  13. True
  14. False
  15. 8
  16. </h3>
  17. contact.html
  18. black
  19. <a href="about.html">
  20. True
  21. Yes
  22. <footer>
  23. an element selector
  24. 1
  25. 18
  26. .big
  27. 1
  28. #00ffff
  29. </title>
  30. 14
  31. </h2>
  32. 20
  33. <!--
  34. white
  35. 10px
  36. False
  37. holds a side box of tips
  38. <h5>
  39. False
  40. the later one

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