diff --git a/content/notes/css.md b/content/notes/css.md index 18fba4a63..47f704d28 100644 --- a/content/notes/css.md +++ b/content/notes/css.md @@ -5,4 +5,52 @@ tags: - cosc203 --- -Css is used to stylise [html](notes/html.md) webpages. +# Structure +```css +h1(selector) { + color(property): red(value/function); \ + font-size: 5em; / - declarations +} +``` + + +# Selectors +Types +- Universal: `*` +- Type: `main` +- Class: `.myclass` +- Id: `#myID` + +adjacent: `p + li {...}` +descendant: `p li {...}` + +```css +/* selects any that is inside a

, which is inside an +

*/ +article p span { } + +/* selects any

that comes directly after a