CSS Introduction

To construct a home we needs two basic things i.e. bricks and cement. In web designing HTML act as bricks and CSS as cement, without combining bricks and cement we can’t construct a strong and beautiful home in same way without combination of HTML and CSS we can’t design a well arranged and beautiful web page.

What does CSS Mean?

The three alphabets in CSS have their own meanings i.e. C- Cascading, S-Style, S-sheets by combining these three alphabets meaning is Cascading Style Sheets. In simple words it is some kind of technique by which we can define style for html elements, means how html elements looks in web page, what will be their colour, size, location and much more things.

Why do we use CSS?

The basic and simple concept of CSS works is to define style for HTML elements. In html there are different kinds of element like <p> , <h> , <a> , <div> etc. by using CSS we can set these elements colour, size, mouse effect etc. Below we are listing some common use of CSS.

  • To define colour scheme.
  • To define background colour.
  • To define font-size.
  • To define width-height.
  • To define padding, margin.
  • To define position.
  • To define mouse over effect.
  • To define animation effects.

Note : These are the only basic things that’s we do by using CSS. Apart from these basic things there are too many advance things that can be implemented by using CSS. We will learn about all of them in details in this CSS tutorial.

How does CSS look like?

CSS looks very simple, There are only two things i.e. the html element identity for which we are going to write CSS code and property:value pairs as CSS code which will affect that html element looks.

Element_identity { Property_1:value1; Property_2:value2; }

Element Identity –

Element identity is used to identify the particular html element or common type html elements from entire html web page, the basic element identities are element name, id, class etc. we will learn html element identity in html selectors tutorial in deep.

Property –

What part of the selector will be affected

Value –

How it will be affected

CSS Example

h4 {
color:aqua; 
font-size:19px;
font-weight:bold; 
}

Identity in real world

Suppose there is a football team, if we want to call player from team then we can call them by –

  1. By Player Name.
  2. By their role name like goal keeper.

In this condition player’s name and their role act as their identity. You can imagine all HTML elements in a HTML page as a team, and one individual html element as a player, in this condition elements tags name, element id, element class etc. act as element identity. Note that some player can have same role so in same way some html element can have same identity like tag name and class. So let’s learn element identity in detail in next lesion.

GDATAMART

We are optimized for learning and job information. We try to improve your knowledge and practical experience through this site but we cannot warrant full correctness of all content. Our Privacy & Policy →

© 2019 gdatamart.com | All Rights Reserved