Embedded Style Sheets

Embedded Style Sheets in CSS3
Embedded style sheets enable you to embed an entire CSS document in an XHTML document’s head section.










Styles placed in the head apply to matching elements wherever they appear in the entire document. The body of the style sheet declares the CSS rules for the style sheet.
A CSS selector determines which elements will be styled according to a rule. The font weight property specifies the “boldness” of text. In this example, all em elements will be displayed in a bold font.
Style class named special. Style classes define styles that can be applied to any element. In this example, we declare class special, which sets color to blue.
The font-family property specifies the name of the font to use. The font-size property specifies a 12-point font.


<head>
      <style type = "text/css">
           em { font-weight: bold;
           color: black }
           h1 { font-family: tahoma, helvetica, sans-serif }
           p { font-size: 12pt;
           font-family: arial, sans-serif }
           .special { color: #6666ff }
      </style>
</head>

<body>
<h1 class = "special">Tutorials Code</h1> <!-- this class attribute applies the .special style -->
<p>Tutorials Code</p>
<h1>Csharp Programming</h1>  
<p class = "special"> some text <em>bold text</em>some other text</p>
</body>

























No comments:

Post a Comment