Cascading Style Sheet specification has been developed to define the major parts of an HTML page display. Some of its features include specification of styles for:
Fonts
Background
Margins and Borders
Spacing, positioning and Alignment
The Style sheet information is usually stored in a separate text file. This file is then linked to the HTML page using the LINK tag. The LINK tag must be placed in the head section of the HTML page.
Example of a Style Sheet (comments are in italics, don’t type these): BODY default style for body section { BACKGROUND-COLOR: aqua; COLOR: yellow; FONT-STYLE: Arial, sans-serif }
#CSSIDA a unique ID that can be applied anywhere in the document { COLOR: blue; FONT-SIZE: large } ADDRESS.MyCSSClass a special class applicable to the ADDRESS element { FONT-STYLE: italic; FONT-FAMILY: Tahoma, Sans-serif } .CSSClassB A “free” class that can be applied to any element { BACKGROUND-COLOR: aqua; FONT-FAMILY: ‘Arial Rounded MT Bold’, sans-serif }
Save above file as style1.css in your webclass/css directory. Create the css subdirectory in c:\WebClass folder if it is not already there.
Now create an HTML file as shown on next page. First we will not apply any styles, then gradually we will include the styles from the STYLE sheet.
Examples of Style Sheet
Welcome to my Web page. I enjoy developing Web Applications Using ASP, JSP and ASP.Net. ASP has several COM based prebuilt objects that can be used in a scripting language such as VBscript, or Javascript, or Perlscript etc.. JSP provides the power of Java, and ASP.Net provides an elegant separation of presentation and code, in addition to a powerful .Net class library. Web development is easy to learn and you can create very useful applications relatively quickly, with it. To learn more about web development, I will recommend taking a