CCT260H5 Lecture Notes - Lecture 7: Cascading Style Sheets
Week 4, Day 7
Folder structure for assignment 2
• CSS files, pages, etc.
o Eteral stle sheet toda’s la
o Ensuring correct file paths
o Using notepad for PCs
• Steps:
o 1) create folder
▪ Will be zipped when assignment is complete
o 2) create subfolders
▪ Subsequent pages (HTML pages)
• Index.html does not go in these subfolders
• Save files with UTF-8 encoding
• Pages can be hobbies, etc. about you for this assignment
o Profs are looking for smart styling choices and understanding of
material
▪ Images
▪ CSS
• Where any external style sheets go
o Could have multiple style sheets if pages have variations in style
• Need to create main.css file that will allow browsers to recognize these
files as style sheets and not html
o Main.css is main homepage style sheet
▪ Videos
o 3) Use w3 tutorials for HTML5 and CSS
▪ Create external style sheet
• HTML is basic content construction, and was never intended to control
all style functions – hence CSS
CSS
• 3 ways to insert CSS
o In-line
▪ Used for images
o External
▪ Separate style sheets
o Internal
▪ Done with HTML, for example
• <head> tag contains metadata and page title
o Href=”stle/ai.ss” is iportat to oet the stle sheet to the htl files
• CSS Box Model
o Most important piece for affecting layout
▪ Preventing content elements from merging into each other
o Padding and margins are transparent buffers around content and opaque borders
find more resources at oneclass.com
find more resources at oneclass.com