← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 953 · 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 JavaScript word repeats code? (a) alert() (b) if (c) let (d) for
  2. 2.⚡ What number does this code print?
    let a = 6;
    let b = 7;
    console.log(a * b);
  3. 3.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a src="about.html"> (d) <a href="about.html">
  4. 4.🔗 Which words do you click on?
    <a href="contact.html">About us</a>
    (a) href (b) Contact us (c) About us (d) contact.html
  5. 5.🚀 Which file is best for code that reacts to clicks? (a) notes.txt (b) script.js (c) style.css (d) index.html
  6. 6.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Litchi</td><td>Jamun</td></tr>
      <tr><td>Grapes</td><td>Papaya</td></tr>
    </table>
  7. 7.⚡ Which JavaScript word runs code when true? (a) console.log() (b) let (c) alert() (d) if
  8. 8.⚖️ Which selector is the weakest? (a) an id selector (b) an element selector (c) a class selector
  9. 9.⚖️ What colour is the text of this element?
    <h1 class="big" id="intro">Hi</h1>
    CSS:
    .big { color: white; }
    .big { color: blue; }
    (a) blue (b) red (c) green (d) white
  10. 10.🌈 Which colour is #0000ff? (a) yellow (b) magenta (c) blue (d) red
  11. 11.♿ Is this heading order correct (no level skipped)?
    <h1> → <h3> → <h4> → <h5>
    (a) Yes (b) No
  12. 12.True or false: in <img>, height sets how tall it is. (a) False (b) True
  13. 13.True or false: <input type="radio"> lets you pick only one. (a) False (b) True
  14. 14.⚖️ What colour is the text of this element?
    <h1 class="star" id="intro">Hi</h1>
    CSS:
    .star { color: red; }
    h1 { color: green; }
    #intro { color: black; }
    (a) black (b) purple (c) green (d) red
  15. 15.📄 Which part holds everything you see on the page? (a) the title (b) the head (c) the body (d) the doctype
  16. 16.📋 How many items does this list show?
    <ul>
      <li>Orange</li>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Jamun</li>
    </ul>
  17. 17.📊 Which tag holds the whole table? (a) <tr> (b) <th> (c) <table> (d) <caption>
  18. 18.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 40px;
      padding: 30px;
      border: 2px solid black;
      margin: 15px;
    }
  19. 19.📊 How many rows does this table have?
    <table>
      <tr><td>Guava</td><td>Grapes</td></tr>
      <tr><td>Papaya</td><td>Litchi</td></tr>
    </table>
  20. 20.📝 Which input type is for one line of words? (a) text (b) date (c) submit (d) email
  21. 21.⚡ Which word makes a new variable? (a) put (b) let (c) give (d) make
  22. 22.⚡ What does this code show?
    let name = "Arjun";
    console.log("Welcome, " + name + "!");
    (a) Welcome, name! (b) Arjun (c) name (d) Welcome, Arjun!
  23. 23.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h1> or <h4>? (a) <h4> (b) <h1> (c) <h3> (d) <h2>
  24. 24.Which of these is not safe to do online? (a) think before you post (b) keep passwords secret (c) tell a trusted adult (d) download from pop-ups
  25. 25.True or false: <tr> makes one table row. (a) False (b) True
  26. 26.🖌️ Which CSS property makes letters bigger? (a) background-color (b) color (c) font-weight (d) font-size
  27. 27.🔍 Which line is missing its closing tag?
    line 1: <strong>Cricket is fun.</strong>
    line 2: <i>Hello, world!</i>
    line 3: <em>Fun facts
    (a) line 1 (b) line 2 (c) line 3
  28. 28.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h6> or <h4>? (a) <h1> (b) <h6> (c) <h2> (d) <h4>
  29. 29.📱 The screen is 320px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 24px;
    }
    @media (min-width: 480px) {
      p {
        font-size: 28px;
      }
    }
  30. 30.What is <input type="submit"> for? (a) hides what you type (b) lets you tick many (c) sends the form (d) takes only numbers
  31. 31.🔗 Which words do you click on?
    <a href="contact.html">School news</a>
    (a) href (b) Take the quiz (c) contact.html (d) School news
  32. 32.🧭 Is <footer> semantic or not semantic? (a) semantic (b) not semantic
  33. 33.🧭 Why use <nav> instead of <div> for a menu? (a) it loads faster (b) it tells its meaning (c) it adds pictures (d) it makes text red
  34. 34.📊 How many cells does this table have in all?
    <table>
      <tr><td>Orange</td><td>Papaya</td></tr>
      <tr><td>Papaya</td><td>Jamun</td></tr>
    </table>
  35. 35.🔗 Which address opens when you click this link?
    <a href="contact.html">Play games</a>
    (a) maths.html (b) Play games (c) contact.html (d) https://example.com
  36. 36.🧩 Which language makes a link? (a) HTML (b) CSS (c) JavaScript
  37. 37.📋 How many items does this list show?
    <ol>
      <li>Guava</li>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Grapes</li>
    </ol>
  38. 38.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ul> (c) <br> (d) <ol>
  39. 39.✍️ Which sign goes between a property and its value? (a) - (b) = (c) ; (d) :
  40. 40.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>Good morning!</p>
    <p>I love mangoes.</p>
    <h2>Rain today</h2>
    <h2>I love mangoes.</h2>

Answer key

  1. for
  2. 42
  3. <a href="about.html">
  4. About us
  5. script.js
  6. 2
  7. if
  8. an element selector
  9. blue
  10. blue
  11. No
  12. True
  13. True
  14. black
  15. the body
  16. 4
  17. <table>
  18. 134
  19. 2
  20. text
  21. let
  22. Welcome, Arjun!
  23. <h4>
  24. download from pop-ups
  25. True
  26. font-size
  27. line 3
  28. <h6>
  29. 24
  30. sends the form
  31. School news
  32. semantic
  33. it tells its meaning
  34. 4
  35. contact.html
  36. HTML
  37. 6
  38. <ul>
  39. :
  40. 3

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