← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 786 · 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.✍️ How many declarations (property: value pairs) are in this rule?
    .note {
      margin: 10px;
      width: 300px;
      border: 2px solid;
    }
  2. 2.🎯 What kind of selector is p? (a) an id selector (b) a class selector (c) an element selector
  3. 3.📝 What does <hr> draw? (a) a picture (b) a table (c) a line across the page (d) a link
  4. 4.🧭 Who is helped most by semantic tags? (a) only the server (b) only the printer (c) screen-reader users (d) nobody
  5. 5.🖌️ What colour are the letters?
    p {
      text-align: right;
      background-color: orange;
      font-size: 20px;
      color: green;
    }
    (a) blue (b) green (c) orange
  6. 6.🖌️ How big is the text, in px?
    p {
      background-color: white;
      text-align: right;
      font-size: 16px;
      color: blue;
    }
  7. 7.📱 max-width: 600px applies when the screen is ___. (a) exactly 1000px (b) 600px or wider (c) 600px or narrower (d) turned off
  8. 8.📦 In the box model, which part is the line round the box? (a) content (b) margin (c) border (d) padding
  9. 9.🔗 Which address opens when you click this link?
    <a href="maths.html">Play games</a>
    (a) art.html (b) Play games (c) maths.html (d) news.html
  10. 10.True or false: <input type="password"> lets you tick many. (a) True (b) False
  11. 11.📊 Which tag gives the table a title? (a) <table> (b) <tr> (c) <th> (d) <caption>
  12. 12.🔠 Which tag is used for the main title on a page? (a) <p> (b) <br> (c) <h1> (d) <h6>
  13. 13.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  14. 14.Which of these is a weak password? (a) S0lar!Pen#8 (b) Kite_Fl1es@Dawn (c) 123456 (d) Mango#Kite29!
  15. 15.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the shorter one (b) neither (c) the first one (d) the later one
  16. 16.🌐 Which one hosts websites online? (a) a web server (b) a web browser (c) a code editor
  17. 17.🏷️ Which is the closing tag for <strong>? (a) <strong> (b) <\strong> (c) <strong/> (d) </strong>
  18. 18.What does color do? (a) sets the letter colour (b) picks the font style (c) colours behind the text (d) makes the text bold
  19. 19.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>I love mangoes.</p>
    <p>Good morning!</p>
    <p>My pets</p>
  20. 20.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
  21. 21.True or false: <aside> holds a news story. (a) True (b) False
  22. 22.⚖️ What colour is the text of this element?
    <p class="star" id="hero">Hi</p>
    CSS:
    #hero { color: green; }
    #hero { color: blue; }
    (a) white (b) green (c) red (d) blue
  23. 23.⚡ What number does this code print?
    let a = 17;
    let b = 32;
    console.log(a + b);
  24. 24.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) yellow (c) bright green (d) cyan
  25. 25.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) cyan (c) bright green (d) yellow
  26. 26.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Sky is blue</p>
  27. 27.🎯 How many elements on a page should have the same id? (a) 2 (b) any number (c) 5 (d) 1
  28. 28.🔍 One closing tag is missing. Which one?
    <h2>Cricket is fun.</h2>
    <p>The red kite
    <b>My best friend</b>
    (a) </p> (b) </small> (c) </b> (d) </h2>
  29. 29.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <h2>My best friend</h2>
    <p>My pets</p>
  30. 30.💬 Why do coders write comments? (a) to leave notes (b) to add colour (c) to show pictures (d) to make links
  31. 31.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <h2>Our school trip</h2>
    <p>Fun facts</p>
    <p>The red kite</p>
    <h2>Fun facts</h2>
    <p>Our school trip</p>
  32. 32.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h6> or <h2>? (a) <h3> (b) <h2> (c) <h1> (d) <h6>
  33. 33.🔁 How many times does this code print “Well done”?
    for (let i = 1; i < 10; i++) {
      console.log("Well done");
    }
  34. 34.💪 Which flexbox property spaces boxes along a row? (a) display: flex (b) align-items (c) justify-content (d) gap
  35. 35.🔢 In a basic web page file, which comes FIRST? (a) <head> (b) <html> (c) <body> (d) <!DOCTYPE html>
  36. 36.🖌️ What colour are the letters?
    li {
      background-color: red;
      text-align: center;
      color: green;
      font-size: 40px;
    }
    (a) red (b) green (c) yellow
  37. 37.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 270px;
      padding: 15px;
      border: 2px solid black;
      margin: 10px;
    }
  38. 38.🔍 Which line is missing its closing tag?
    line 1: <p>Good morning!</p>
    line 2: <em>Fun facts</em>
    line 3: <b>Hello, world!
    (a) line 1 (b) line 2 (c) line 3
  39. 39.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>My pets</p>
    <h2>Hello, world!</h2>
    <p>Fun facts</p>
    <h2>The red kite</h2>
  40. 40.🎨 A CSS file usually ends with which extension? (a) .css (b) .js (c) .png (d) .html

Answer key

  1. 3
  2. an element selector
  3. a line across the page
  4. screen-reader users
  5. green
  6. 16
  7. 600px or narrower
  8. border
  9. maths.html
  10. False
  11. <caption>
  12. <h1>
  13. an opening tag
  14. 123456
  15. the later one
  16. a web server
  17. </strong>
  18. sets the letter colour
  19. 1
  20. in the body
  21. False
  22. blue
  23. 49
  24. bright green
  25. yellow
  26. 2
  27. 1
  28. </p>
  29. 2
  30. to leave notes
  31. 4
  32. <h6>
  33. 9
  34. justify-content
  35. <!DOCTYPE html>
  36. green
  37. 304
  38. line 3
  39. 3
  40. .css

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