CSS
In this article we are going to learn about css, what is css and what does it stands for also what is used for and how does css look like.
What is CSS?
CSS is a style sheet language used to give web pages structure by determining how html will be displayed on the web page, can change the background color of the web page and give positions of paragraphs, images or videos even setting their sizes.
What is CSS in full?
C stands for Cascading, S for Style and another S for Sheets. So in full is Cascading Style Sheets.
What does CSS used for?
CSS is used in website development to give web pages structure and it helps website developers style html elements on the web pages, to give texts custom colors, size, font style or family, font weight (bold or italic), even the position.
How to write or code CSS?
CSS has its rules to style html. First of all to code CSS we need text editor and we must save each CSS file we created as filename.css. However, css can be written in html file not on its own file, can be inline, meaning coded in html elements and can be coded in style tags <style> </style>.
We are going to use notepad++ as our text editor so, if you do not have it just download it and install it either on your mobile phone, laptop or desktop, can be any of them.
So let get started, open your notepad++ and copy and paste the code below. Save your file (css file) as tutorial.css and after saving our file let us connect or link it with our html file.
/* set paragraph text color */
p {
color: red;
}
The above code is how our css file code look like and we should link it with our previous html file. Make sure you paste the following code in html file between head tags do not repeat head tags, in below we already included them for demonstration.
<head>
<!-- set paragraph text color -->
<!-- link or connect html file with css file -->
<link rel="stylesheet" href="tutorial.css">
</head>
The above code is how we link css and html in html file and make sure you paste it in your html file we created previously.
When running html file (tutorial.html) on the browser we should have the following results and we can see that our paragraph text color is now red.
