CSS styeles the html elements. CSS stands for cascading sheet style. HTML is the root and leaf of a tree and css is water, light and carbodioxide for that tree.
CSS is used to give better looks and format of the html elements. We can apply css in html using  ways: inline css, internal css and external css.
HTML and CSS

Inline css can be applied using the attribute. Inline css is used to style one element of the page. Here is an example of inline css style

<h1 style="color:blue;margin-right:20px; font-family:arial; font-style:italic;">This is an inline style.</h1>

Internal css can be applied using <style> </style> tag in the head section of document. Internal css is used to provide style for whole document. The example of internal css is given below:

<head>
<style>
body {background-color:red; font:arial; font-weight:bold;}
p {color:white; font-family:verdana;}
</style>
</head>

External css can be applied using external css file. This style is used to provide style for all the html files. External css is applied by using link element. First of all you make a css file in a different file and then you link it to the html file like following example:

<head>
<link type="text/css" rel="stylesheet"  href="radhikaryal.css">
</head>

So these are the techniques of applying the css in html documents. So for further study of the css, we will be connected with you in another lesson or posts. So keep on learning. Thank You.
Comment Us, if you have any questions.

Post a Comment

 
Top