Skip to main content
Richard Hill - Online Learning
An Introduction to XMLZIPPDF (letter)PDF (A4)e-mail
Main menuSection menuFeedbackPreviousNext
4. XHTML
  


No Minimised Attributes page 6 of 11


What do we mean by minimised attributes?

With HTML, attributes appear in a name-value pair, unless they are minimised. This looks like:

<INPUT TYPE="radio" NAME="CCType" VALUE="Visa">

<INPUT TYPE="radio" NAME="CCType" VALUE="Mastercard">

The data returned from these input elements will consist of "CCType" and either "Visa" or "Mastercard", thus constituting the name-value pair.

However the SELECTED attribute has been minimised below - what this means is that the minimised attribute works without a value.

<INPUT TYPE="radio" NAME="CCType" VALUE="Visa" SELECTED>

<INPUT TYPE="radio" NAME="CCType" VALUE="Mastercard">

So when the web page is displayed, the HTML above will show the first value already selected.

However, XML demands that minimised attributes are written as a name-value pair, and so XHTML follows suit. Our 'SELECTED' attribute now must become:

<input type="radio" name="CCType" value="Visa" selected="selected">


Main menuSection menuFeedbackPreviousNext
www.shu.ac.uk/schools/cms/teaching/rh1