Showing posts with label XHTML Atributes. Show all posts
Showing posts with label XHTML Atributes. Show all posts

Wednesday, August 15, 2012

XHTML Atributes


XHTML attributes are HTML attributes written as XML

XHTML Attributes - Syntax Rules

  • Attribute names must be in lower case
  • Attribute values must be quoted
  • Attribute minimization is forbidden

Attribute Names Must Be In Lower Case

This is wrong:

<table WIDTH="100%">

This is correct:

<table width="100%">


Attribute Values Must Be Quoted

This is wrong:

<table width=100%>

This is correct:

<table width="100%">


Attribute Minimization Is Forbidden

This is wrong:

<input checked>
<input readonly>
<input disabled>
<option selected>

This is correct:

<input checked="checked" />
<input readonly="readonly" />
<input disabled="disabled" />
<option selected="selected" />