➤ CSS stands for Cascading Style Sheets.
➤ CSS gives attractive look to the websites or Webpages.
➤ External style sheet stored in css file.
Types of CSS
CSS is deffine on three types.
Inline CSS
➤ CSS gives attractive look to the websites or Webpages.
➤ External style sheet stored in css file.
Types of CSS
CSS is deffine on three types.
- External CSS
- Internal CSS
- Inline CSS.
External CSS
In This type of CSS file, We can joint External CSS to web pages with a link. For this we create the web page and in this web page gives a link to CSS file.
The location of this link is in the web pages <head> tag. and the code is
<head> <link rel ="stylesheet" type = "text/css" href = "style.css"> </head>
where style.css is the name of the External CSS file.
Internal CSS
An Internal style sheet should be used when a single document has a unique style.You deffine Internal styles in the head section by using <style> tag,
Example :
<head>
<style type=text/css>
hr{color:blue;}
p{margin-left:20px;}
</style>
</head>
Inline CSS
Use the method sparingly, such when a style is to be applied to a single occureence of an element.
we gives css with in HTML code is called Inline CSS.
Example :
<body style=" border 1px solid #333; margin:50px;">
< p style="color:black; margin:20px;">
This is a paragraph.
</p>
style=" border 1px solid #333; margin:50px;"
style="color:black; margin:20px;" is called Inline CSS
style="color:black; margin:20px;" is called Inline CSS