Skip to main content

CSS

XHTML Syntax

HTML was the first markup language I learned, and its elegant simplicity provided a shallow learning curve that allowed users with even the most basic concept of computing to produce visually appealing websites. As multimedia content began to flood the Internet, HTML co-evolved with different server- and client- side scripting and programming languages to facilitate the new demands for interactive and dynamic content. The segregation of structural and visual attributes into XHTML and CSS represents a tremendous, but natural, leap forward in the language's evolution. XHTML allows authors to focus on a logical document structure with quality content by passing the majority of the difficult visual settings off the the Style Sheets. This logical division of labour may also explain why many scientists favour the LaTeX markup language over WYSIWYG word processors: writers can worry about their writing instead of wrestling with the typesetting. XHTML also provides HTML with XML compliance (hence the 'X'), the formal markup metalanguage that represents a degree of improvement over its SGML ancestor comparable to that offered by XHTML over its HTML predecessor. Many of the tags have been carried over from HTML, but with two important constraints introduced by the XML. The first is that all attribute valuesmust be enclosed in "quotation marks". Whereas <tr colspan=2> is a valid HTML tag, it must be <tr colspan="2"> to be a valid XHTML tag. The second constraint is that every opened tag must be closed. Even tags without natural closing counterparts (e.g. <br>) must be closed by including the closing in the tag (e.g. <br/>). Once you remember these two rules, then transitioning from HTML to XHTML is simply a matter of learning to separate content from appearance.

Syndicate content