← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 889 · 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 runs code when true? (a) if (b) console.log() (c) alert() (d) let
  2. 2.🚀 Which file should this code go in: body { margin: 0; } (a) index.html (b) style.css (c) script.js
  3. 3.♿ Is this heading order correct (no level skipped)?
    <h1> → <h2> → <h4> → <h5>
    (a) No (b) Yes
  4. 4.Which of these is true of a web browser? (a) answers page requests (b) hosts websites online (c) shows pages from the web (d) is where we type code
  5. 5.True or false: <ol> shows bullet points. (a) True (b) False
  6. 6.📊 Which tag holds the whole table? (a) <td> (b) <tr> (c) <th> (d) <table>
  7. 7.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 4 (d) 3
  8. 8.🌍 What is the path in this URL?
    http://learn.example.com/games/chess.html
    (a) learn.example.com (b) http (c) /about.html (d) /games/chess.html
  9. 9.✍️ Which sign ends each CSS declaration? (a) , (b) ; (c) . (d) :
  10. 10.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <p>Hello, world!</p>
    <p>Our school trip</p>
    <!-- <p>I love mangoes.</p> -->
  11. 11.⚖️ What colour is the text of this element?
    <p class="red" id="top">Hi</p>
    CSS:
    p { color: purple; }
    p { color: green; }
    (a) red (b) purple (c) blue (d) green
  12. 12.🚀 Which tag loads script.js into a page? (a) <a href="script.js"> (b) <link script.js> (c) <script src="script.js"> (d) <js src="script.js">
  13. 13.True or false: <article> helps you move around. (a) True (b) False
  14. 14.⚖️ What colour is the text of this element?
    <h2 class="note" id="logo">Hi</h2>
    CSS:
    #logo { color: purple; }
    .note { color: white; }
    h2 { color: green; }
    (a) yellow (b) green (c) white (d) purple
  15. 15.✍️ Which property is set to 2px solid in this rule?
    p {
      margin: 10px;
      border: 2px solid;
      font-size: 20px;
      color: red;
    }
    (a) width (b) font-style (c) 2px solid (d) border
  16. 16.True or false: HTML on its own can keep a high score. (a) False (b) True
  17. 17.🔗 Which address opens when you click this link?
    <a href="https://example.com">Art corner</a>
    (a) https://example.com (b) Art corner (c) art.html (d) maths.html
  18. 18.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h1> or <h3>? (a) <h3> (b) <h2> (c) <h5> (d) <h1>
  19. 19.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h3> or <h1>? (a) <h1> (b) <h5> (c) <h6> (d) <h3>
  20. 20.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>My best friend</p> -->
    <p>Fun facts</p>
  21. 21.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a alt="about.html"> (c) <link about.html> (d) <a src="about.html">
  22. 22.True or false: to use a strong password is safe. (a) False (b) True
  23. 23.🔁 What does this code print?
    let marks = 26;
    if (marks > 6) {
      console.log("Pass");
    } else {
      console.log("Try again");
    }
    (a) Pass (b) Try again
  24. 24.🧩 Which language sets colours and fonts? (a) HTML (b) JavaScript (c) CSS
  25. 25.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Birds sing<br>Kites fly high<br>Sky is blue<br>Roses are red</p>
  26. 26.🔗 Where does this link open?
    <a href="about.html">Maths fun</a>
    (a) in a new tab (b) in the same tab
  27. 27.Which of these is margin? (a) space inside the border (b) the gap round content (c) space outside the border (d) a solid or dotted edge
  28. 28.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="radio" name="sport"> Chess
      <input type="radio" name="sport"> Cricket
      <input type="radio" name="sport"> Kabaddi
      <input type="radio" name="sport"> Hockey
      <input type="radio" name="sport"> Football
    </form>
  29. 29.⚡ Which word makes a new variable? (a) let (b) give (c) put (d) make
  30. 30.💬 How does an HTML comment start? (a) <!-- (b) # (c) // (d) /*
  31. 31.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it blank (c) makes it bold (d) hides the link
  32. 32.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="250">
    (a) A red kite (b) Map of India (c) kite.png (d) width
  33. 33.⚖️ What colour is the text of this element?
    <h1 class="big" id="main">Hi</h1>
    CSS:
    #main { color: white; }
    #main { color: yellow; }
    (a) green (b) white (c) purple (d) yellow
  34. 34.Which of these is true of <footer>? (a) is the page’s key part (b) sits at the bottom (c) holds a news story (d) sits at the very top
  35. 35.🔁 Which loop repeats code a set number of times? (a) let (b) else (c) for (d) if
  36. 36.Which of these is an empty tag? (a) <br> (b) <b> (c) <h1> (d) <title>
  37. 37.📋 Which list tag is an ordered list? (a) <li> (b) <ol> (c) <ul>
  38. 38.⚖️ What colour is the text of this element?
    <h1 class="menu" id="end">Hi</h1>
    CSS:
    h1 { color: orange; }
    #end { color: purple; }
    .menu { color: green; }
    (a) orange (b) purple (c) green (d) red
  39. 39.🔠 Which tag is the least important heading? (a) <h1> (b) <h3> (c) <h6> (d) <p>
  40. 40.🧭 Why use <nav> instead of <div> for a menu? (a) it tells its meaning (b) it loads faster (c) it makes text red (d) it adds pictures

Answer key

  1. if
  2. style.css
  3. No
  4. shows pages from the web
  5. False
  6. <table>
  7. 6
  8. /games/chess.html
  9. ;
  10. 2
  11. green
  12. <script src="script.js">
  13. False
  14. purple
  15. border
  16. False
  17. https://example.com
  18. <h1>
  19. <h1>
  20. 1
  21. <a href="about.html">
  22. True
  23. Pass
  24. CSS
  25. 5
  26. in the same tab
  27. space outside the border
  28. 1
  29. let
  30. <!--
  31. opens it in a new tab
  32. A red kite
  33. yellow
  34. sits at the bottom
  35. for
  36. <br>
  37. <ol>
  38. purple
  39. <h6>
  40. it tells its meaning

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