What is CSS?
CSS is a language that allows you to change the appearance of your web page. You can use CSS to customize your site and make it unique!
How do I use CSS?
Start off by creating an HTML document.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
</body>
</html>
Now, create a file ending with .css.
After you've created your .css file, you can route your HTML document to your CSS file.
Insert the following command in the head of your HTML doc.
<link href= "*route*" rel= "stylesheet">
Below, I've routed my CSS file "example.css" to my HTML document.
<!DOCTYPE html>
<html lang="en">
<head>
<link href="/Markup/.css/example.css" rel="stylesheet">
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
</body>
</html>
What from here?
Now that you've got your HTML and CSS documents connected, you can begin customizing.
Let's say we wanted to change some things about the body of our HTML document. This is what you would input to get started...
body {
}
From here, there are a plethora of options for you to choose from. Background color, font, positioning, and many more. For this example, let's change the background color of the document to red. This is what that would look like...
body {
background-color: red;
}
CSS is important
Having a web page that is pleasing to the eyes of the user is absolutely vital to building a good site. CSS is a tool that can take your development to the next level, so be sure to put in a lot of time and effort!
Leave a Reply