CSS Referenes

Adding a style to the webpage is easy! We use a file called style.css, it's placed inside the <head>
Example:

<link rel="stylesheet" href="style.css">


CSS-Rule:A Selector and its properties form a CSS rule. For lack of a better explaination, it's CSS's verison of a element. There's no limit to how many rules can be in a webpage!


It's an element followed by {, then you add the attribute you want, end it with ;, fianlly close with }
Example targeting ALL h1 of the webpage making them green:

h1{
color:green;
}

At some point you'll want to target just one element to style, to do so you can use the "Class" attribute. Classes arent unique so you can apply the same class to multiple elements.

Example: Targeting paragraphs of the webpage:

.p{
color:blue;
}


CSS Borders

3MDN

Borders are a line around an element of a certain thickness and color.


Border-Radius

MDN

To make an image an circle, we set border-radius to half the width of an imgage.

This only works if the image is a square!

img{
	height: 100px;
	width: 100px:
	border-radius: 50px;
}