Web Worksheet: Your First Website
Code tip (One file per job): Tags → index.html; selector { … } → style.css; let, alert, console.log → script.js. Plan → write the HTML → add CSS → test in a browser → publish. Use small letters and dashes in file names; save and refresh to see changes.
NameDateTime takenScore ___ / 40
- 1.🚀 Which tag loads script.js into a page? (a) <a href="script.js"> (b) <js src="script.js"> (c) <link script.js> (d) <script src="script.js">
- 2.True or false: <h1>My Site</h1> goes in index.html. (a) True (b) False
- 3.🔢 To build and share your first web page, which comes FIRST? (a) add CSS styles (b) test in a browser (c) publish it online (d) plan what to show
- 4.🚀 Which file should this code go in: alert("Hi"); (a) index.html (b) style.css (c) script.js
- 5.True or false: #top { color: blue; } goes in style.css. (a) True (b) False
- 6.🚀 Which file is best for code that reacts to clicks? (a) style.css (b) notes.txt (c) index.html (d) script.js
- 7.🚀 Should file names have spaces, like my page.html? (a) Yes (b) No
- 8.🔢 To build and share your first web page, which comes first: “plan what to show” or “add CSS styles”? (a) add CSS styles (b) plan what to show
- 9.🚀 Which file should this code go in: .box { padding: 8px; } (a) style.css (b) index.html (c) script.js
- 10.True or false: <a href="a.html">Go</a> goes in style.css. (a) False (b) True
- 11.🚀 You change your code. What should you do to see the change? (a) delete the file (b) rename the folder (c) save and refresh (d) switch off the PC
- 12.🔢 To build and share your first web page, which comes first: “test in a browser” or “write the HTML”? (a) test in a browser (b) write the HTML
- 13.🚀 Which file should this code go in: let score = 0; (a) script.js (b) style.css (c) index.html
- 14.True or false: <p>Hello!</p> goes in style.css. (a) False (b) True
- 15.🚀 Which file should this code go in: <img src="cat.png"> (a) script.js (b) index.html (c) style.css
- 16.True or false: <p>Hello!</p> goes in script.js. (a) False (b) True
- 17.True or false: body { margin: 0; } goes in index.html. (a) False (b) True
- 18.🔢 To build and share your first web page, what comes right after “add CSS styles”? (a) test in a browser (b) plan what to show (c) publish it online (d) write the HTML
- 19.🚀 Which file should this code go in: <p>Hello!</p> (a) style.css (b) script.js (c) index.html
- 20.True or false: <ul><li>Art</li></ul> goes in script.js. (a) False (b) True
- 21.True or false: score = score + 1; goes in script.js. (a) False (b) True
- 22.🔢 To build and share your first web page, which comes LAST? (a) test in a browser (b) plan what to show (c) write the HTML (d) publish it online
- 23.🚀 Which file should this code go in: console.log(5 + 2); (a) script.js (b) style.css (c) index.html
- 24.🚀 Which program lets you see your web page while you build it? (a) a music player (b) a web browser (c) a photo viewer (d) a calculator
- 25.🚀 Which file should this code go in: p { color: red; } (a) script.js (b) index.html (c) style.css
- 26.True or false: alert("Hi"); goes in index.html. (a) True (b) False
- 27.True or false: p { color: red; } goes in script.js. (a) True (b) False
- 28.True or false: let score = 0; goes in style.css. (a) False (b) True
- 29.🚀 Which file should this code go in: alert(score); (a) index.html (b) style.css (c) script.js
- 30.True or false: console.log(5 + 2); goes in style.css. (a) True (b) False
- 31.🚀 Which file is best for the colours and fonts? (a) index.html (b) photo.jpg (c) script.js (d) style.css
- 32.True or false: p { color: red; } goes in style.css. (a) True (b) False
- 33.True or false: alert(score); goes in style.css. (a) True (b) False
- 34.🚀 Where in index.html does the link to style.css go? (a) after </html> (b) inside a <p> (c) in the footer (d) in the head
- 35.True or false: body { margin: 0; } goes in style.css. (a) False (b) True
- 36.True or false: .box { padding: 8px; } goes in index.html. (a) True (b) False
- 37.🚀 Which file should this code go in: h1 { font-size: 32px; } (a) script.js (b) index.html (c) style.css
- 38.🚀 Which file should this code go in: <a href="a.html">Go</a> (a) index.html (b) style.css (c) script.js
- 39.🚀 Which file should this code go in: <h1>My Site</h1> (a) script.js (b) style.css (c) index.html
- 40.🚀 What is the home page file of a website usually called? (a) start.js (b) index.html (c) main.png (d) home.css
Answer key
- <script src="script.js">
- True
- plan what to show
- script.js
- True
- script.js
- No
- plan what to show
- style.css
- False
- save and refresh
- write the HTML
- script.js
- False
- index.html
- False
- False
- test in a browser
- index.html
- False
- True
- publish it online
- script.js
- a web browser
- style.css
- False
- False
- False
- script.js
- False
- style.css
- True
- False
- in the head
- True
- False
- style.css
- index.html
- index.html
- index.html
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids