Sunday, April 1, 2007

Week 5 : XHTML + CSS

A. Three flavors of XHTML 1.0
1.XHTML 1.0 Strict -- Use this when you want really clean structual mark-up, free of any markup associated with layout. Use this together with W3C's
Cascading Style Sheet language(CSS) to get the font, color, and layout effects
you want.
2.XHTML 1.0 Transitional -- Many people writing Web pages for the general public to access might want to use this flavor of XHTML 1.0. The idea is to take advantage of XHTML features including style sheets but nonetheless to make
small adjustments to your markup for the benefit of those viewing your pages
with older browsers which can't understand style sheets. These include using
the body element with bgcolor, text and link attributes.
3.XHTML 1.0 Frameset -- Use this when you want to use Frames to partition the browser window into two or more frames.
B.XHTML 2.0
XHTML 2.0 is a markup language intended for rich, portable web-based applciations. While the ancestry of XHTML 2.0 comes from HTML 4, XHTML 1.0, and XHTML 1.1, it is not intended to be backward compatible with its earlier versions. Application developers familiar with its earlier ancestors will be comfortable working with XHTML 2.0.
XHTML 2.0 updates many of the modules defined in Modularization of XHTML, and includes the updated versions of all those modules and their semantics.
C.The benefits of CSS
1.Control layout of many documents from one single style sheet
2.More precise control of layout
3.Apply different layout to different media-types(screen, print, etc.)
4.numerous advanced and sophisticated techniques
D. Grouping of elements (Span and Div)
1.The elements and are used to group and structure a document and will often be used together with the attributes class and id.
The element is what you could call a neutral element which does not add anything to the document itself. But with CSS, can be used to add visual features to specific parts of text in your documents.
E.The Box Model
The box model in CSS describes the boxes which are being generated for HTML-elements. The box model also contains detailed options regarding adjusting margin, border, padding and content for each element.
F.Floating elements
An element can be floated to the right or to left by using the property float. That is to say that the box with its contents either floats to the right to the left in a document.
G.Layer on layer with z-index
CSS operates in three dimensions - height,widht and depth. Layers can be used in many situations. For example, try to use z-index to create effects in headlines instead of creating these as graphics. For one thing, it is faster to load text and for another, it provides a potentially better ranking in search engines.
H.XML
1.Well-formed documents
--One and only one root element exists for the document.
--Non-empty elements are delimited by both a start-tag and an end-tag.
--Empty elements may be marked with an empty-element tag.
--All attribute values are quoted, either sing or double quotes.
--Tags may be nested but must not overlap. Each non-root element must be completely contained in another element.
--The document complies to its character set definition. The charset is usually defined in the xml declaration but it can be provided by the transport protocol, such as HTTP.
2.DTD
--The oldest schema format for XML is the Document Type Definition(DTD), inherited from SGML. While DTD support is ubiquitous due to its inclusion in the XML 1.0 standard.
3.XML Schema
--A newer XML schema language, described by the W3C as the successor of DTDs, is XML Schema, or more informally referred to by the intialism for XML Schema instances, XSD(XML Schema Definition). XSDs are far more powerful than DTDs in descrbing XML languages. They use a rich datatyping system, allow for more detailed constraints on an XML document's logical structure and are required to be processed in a more robust validation framework.
I.RSS
--RSS stands for Really Simple Syndication
--RSS allows you to syndicate your site content
--RSS defines an easy way to share and view headlines and content
--RSS files can be automatically updated
--RSS allows personalized views for different sites
--RSS is written in XML
--RSS is useful for web sites that are updated frequently
News sites, Companies, Calendars, Site changes
--With RSS, information on the internet becomes easier to find, and web developers can spread their information more easily to special interest groups.
J.CSS Pseudo-classes & elements
-- :active Adds special style to an activated element
-- :focus Adds special style to an element while the elements has focus
-- :hover Adds special style to an element when you mouse over it
-- :link Adds special style to an unvisited link
-- :visisted Adds special style to a visited link
-- :first-child Adds special style to an element that is the first child of some other element
-- :lang Allows the author to specify a language to use in a specified element
-- :first-letter Adds special style to the first letter of a text
-- :first-line Adds special style to the first line of a text
-- :before Inserts some content before an element
-- :after Inserts some content after an element

No comments: