X hits on this document

374 views

0 shares

1 downloads

0 comments

59 / 142

Chapter 7. XHTML

Introduction

XHTML a pure XML implementation of HTML. Therefore the six rules of XML syntax apply: there is one root element, element names are case-sensitive (lower-case), elements must be closed, elements must be correctly nested, attributes must be quoted, and the special characters must be encoded as entit- ies. There are a few XHTML DTDs ranging from a very strict version allowing no stylistic tags or tables to a much more lenient version where such things are simply not encouraged. XHTML documents re- quire a DOCTYPE declaration at the beginning of the file in order to specify what version of XHTML follows. So, the following things apply:

  • Your document must have one and only one html element.

  • All elements are to be lower-case

  • Empty elements such as hr and br must be closed as in <hr /> and <br />

  • Attributes must be quoted as in <img src="logo.gif" />

  • You can not improperly next elements

  • The <, >, and & characters must be encoded as entities

XHTML has four of "common" attributes, attributes common to any XHTML element. These attributes are:

  • 1.

    id - used to identify a unique location in a file

  • 2.

    title - used to give a human-readable label to an element

  • 3.

    style - a place older for CSS style information

  • 4.

    class - used to give an element label usually used for CSS purposes

51

Document info
Document views374
Page views380
Page last viewedSat Dec 03 14:28:46 UTC 2016
Pages142
Paragraphs3126
Words34660

Comments