Cascading Style Sheet (CSS) Introduction

What is Cascading Style Sheet?

Style Sheets Represent the World Wide Consortioum (w3c’s) Effort ot Improve on the Tag and Attribute Based Style of Formatting.The Idea is the style sheets provide a way of Customizing Whole pages at once and in Much Richer Detail than the Simple use of Tags and Attributes.

Advantage of CSS?

  • Allows for much richer document appearances than HTML.
  • Reduce Workload by centralizing commands for visual appearance instead of scattered throughout the HTML doc.
  • Use same style on multiple pages.
  • Reduce Page download size.

Types of Cascading Style Sheets

EMBEDED STYLE SHEET:Defines styles for the complete HTML document in one place

<!DOCTYPE html>
<html>
<head>
<style type="text/css">
p {
 font-family: georgia, serif; 
 font-size: x-large;
 color:#ff9900;
 }
a:hover {
 color: LimeGreen; 
 text-decoration: none;
 }
</style>
</head>
<body>
<p>This paragraph tag has been preset using embedded style sheets. </p>
<p>Also see <a href="#" target="_blank">Internal Style Sheet </a></p>
</body>
</html>

INLINE STYLE SHEET:- If you Define the styles withe in the “style” tag the web page comes under Inline Style Sheet.These style we can apply to all HTML elements with in the page.

 

Leave a Reply

Your email address will not be published. Required fields are marked *