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