Thursday, July 19, 2012

HTML Styles

CSS or Cascading Style Sheets are used to format the layout(look/style) of your Web page. CSS helps Web developers create a uniform look across several pages of a Web site. Instead of defining the style of each table and each block of text within a page's HTML, commonly used styles need to be defined only once in a CSS document. Once the style is defined in cascading style sheet, it can be used by any page that references the CSS file.  In addition, CSS makes it easy to change styles across several pages at once.CSS is also helpful for formatting other aspects of Web page layout as well. For example, CSS can be used to define the cell padding of table cells, the style, thickness, and color of a table's border, and the padding around images or other objects. CSS gives Web developers more exact control over how Web pages will look than HTML does. This is why most Web pages today incorporate cascading style sheets.CSS was introduced only with HTML 4 and can be included in you webpage in three different ways:
  1. Inline
  2. Internal or
  3. External
Inline is a way in which you can embed your style(CSS) by placing it as an attribute to an HTML tag.

Internal style sheet representation refers the usage of style tag(<style></style>) under the head section(i.e between <head> and </head>).

External stylesheet makes use of a external CSS file .

Stay tuned.


Post a Comment