- Published on
CSS | Lets Start
- Authors

- Name
- Saqib Tanveer
Lets talk about CSS:
Thing about a car. We can divide a car into three parts when talking about how cars are made.
- Parts of car.
- Styling (color, design, which part should be where).
- Engine of a car.
Today we just have to talk about the second one. The styling. CSS is just for styling the websites.
Lets consider a example. I hope it will help you to better understand.
First consider the HTML code here below.
<div>
<h1>Heading</h1>
<p>This is a paragraph.</p>
</div>
In the above example we have a box and we are telling the browser that on the page show a box inside which you have to display a heading and a paragraph.
Now lets take a look at how we can style it by CSS
div {
background-color: 'black';
}
h1 {
color: 'red';
}
p {
color: 'white';
}
In the above code we are just intructing the browser that change the background color of the box to black and then change the color of heading and paragraph to red and white respectively.
The CSS is as simple as like that. Now what you have to do is just to explore new properties like background-color, color, width, height etc and use them.