Pages

What is CSS ?

Saturday, 3 November 2012



Cascading style sheets (CSS) provides a simple way to style the content on your web pages. Basics of CSS

The Advantages of Using CSS for Style

There are numerous real-world advantages to separating content and style, and most of you
are probably already aware of them.
By separating the two layers of your document, you make it simple to add, remove, or
update content without having to worry about botching up your layout. You also make it easy
to change the font used for the entire site without having to dig through your content in search of every single <font> tag. Separating the two layers allows a web team to work efficiently.
Your visual designers can focus on design while your content producers focus on content—and
neither has to worry about the other getting in their way. If you’re a solo developer, you’ll find
that the separation of content and presentation allows you to keep your “frames of mind” separate and also when you need to make a change to content, you won’t have to dig through
a bunch of style code to find what you’re looking for.
We will  cover the basics of modern (X)HTML markup. Because CSS expects
you to have written clean, valid, and semantic markup for your documents, it’s essential to
have this piece of the equation in great shape before moving on to the presentation layer of
your page or site.

What is XHTML ?

XHTML is a reformulation of HTML in XML. Because of this, XHTML
documents are both hypertext documents and XML documents.
XHTML, because of its XML roots, has far more rigorous syntax rules than HTML. Although
this may seem like a bad thing at first glance, it actually forces authors to be more precise, which
in turn makes XHTML documents easier to maintain than their HTML counterparts. The most
relevant examples of XHTML’s more particular syntax requirements include insisting that all element
and attribute names be lowercase, requiring that all attribute values be quoted, and
demanding that all elements—even empty ones—be properly closed.

DOCTYPE: The Most Underappreciated Tag of All

All modern, valid (X)HTML documents must open with a DOCTYPE declaration. DOCTYPE is an
(X)HTML string created primarily as a validation mechanism. It indicates to the browser, validator,
or other reading device what sort of document you are writing, as well as which specification,
or set of rules, you are writing it against. Most modern browsers actually display the page differently
based on what DOCTYPE is declared
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

The Three Layers of a Modern Web Document

well-constructed web documents have three distinct layers of .
structure layer:  which is a text document marked up in HTML or XHTML. It contains the content of your document, along with the semantic information that indicates what each bit of text is (headers, paragraphs, lists, and so forth).
HTML
Structure Layer
CSS
Presentation Layer
Java Script
Behavior Layer
presentation layer : It describes how your document will be presented to the visitor, such details as layout, typography,colors, decorative images. Generally, the presentation layer of a web document is written using CSS.
behavior layer:scripting (usually JavaScript for manipulating the Document Object Model, or DOM) to update, add, or remove items from the document based on the user’s behavior.

No comments:

Post a Comment

 

Labels

Blogger news

Blogroll

Most Reading

Tags