Now, we are going to start CSS and we are going to make our website look amazing!
First create a new file called style.css
.
Right now, we are just going to learn how to select an element.
First we can select a certain tag like this:
tagname{
style
}
Make sure that you put the css code that when we learn it INSIDE THE CURLY BRACES. If you want to access classes or id's, there is a way to do that. Here is the code:
.classname{
style
}
#idname{
style
}
Now, if you want the CSS to do anything, you have to link it. This is the code for linking a CSS file:
<link rel="stylesheet" link="name of the css file (eg style.css)"></link>
Previous
Next