What is CSS used for? - CSS introduction or the introduction of CSS

What is CSS used for?
What is CSS used for? - CSS introduction or the introduction of CSS

In this snippet, we are going to learn that how to create our web pages look more attractive and professional by controlling the design of it using the CSS

What is CSS used for? - CSS introduction or the introduction of CSS


CSS stands for Cascading Style Sheets which is used for controlling you to create rules that specify how the content of an element should appear. CSS is an extremely powerful style sheet language that works by associating rules with HTML elements that govern how the content of specified elements should be revealed.

CSS introduction or the introduction of CSS
What is CSS used for? - CSS introduction or the introduction of CSS


CSS introduction

In general, you use HTML to describe your web page, not its style. Let's suppose you want to add and show that HTML h1 heading which should be in the center so you will use CSS for it And if you want that size of the image should be something at this stage you can also do that. When you use CSS. you probably avoid these HTML style features so your document style information is in one place. And we are able to keep every visual aspect of the website completely separated from the content, Using CSS when designing our websites helps us to handle all elements form one stylesheet or several.


Main Points:

1. A CSS rule contains two parts one is selector other is declaration. Such as we make an element in HTML like img tag that we want to resize it and use a property called width.

<img> --- It is created in HTML. 

img{
     width: 20px;
} --- It is method for giving any 
element to style in CSS.

2.Where img is a selector and between curly brackets called declaration.

3. Selectors indicate which element the rule applies to. Declarations indicate how the elements should be styled

4. CSS declaration sit inside curly brackets and each property made up to two parts:
A property and a value, separated from colon. You can specify multiple properties in one declaration, each separated by a semi-colon.

5. With an external stylesheet file, you can change whole look of an entire website by just one file.

6. The style definition are normally stored in external .css files. If we want to make an external style file so you must to put .css and before this dot you can write something which you want.
Like sheet.css, style.css, etc but mostly developers use style.css because it is standard for making a file of CSS


To get knowledge about HTML check out following links






Post a Comment

0 Comments