|
|||||||||||||||||||||
|
|||||||||||||||||||||
|
Announcements
Want a new Job?
Chapters
Services
Feature Zones
|
IntroductionWith experience, working with ASP.NET, I noticed some important XHTML tags that are rarely used by web developers, even the experienced ones, so I thought of writing this article to promote them. Most of the mentioned elements are HTML compatible, but all of them are XHTML compatible. I've tested these elements on Internet Explorer 6 and Firefox 1.5. Also, I've validated the demo project against XHTML 1.1 and XHTML 1.0 Transitional on the W3C Validator. The elements are 1. optgroup
<label for="county">County</label>
<select id="county">
<optgroup label="England">
<option>Surrey</option>
<option>Kent</option>
</optgroup>
<optgroup label="Scotland">
<option>Orkney</option>
</optgroup>
</select>
<label for="languages">Languages</label>
<select size="6" multiple="multiple" id="languages">
<optgroup label="Classical">
<option>C#</option>
<option>C++</option>
<option>Java</option>
</optgroup>
<optgroup label="Web">
<option>ASP.NET</option>
<option>PHP</option>
</optgroup>
</select>
The Unfortunately, this element is not generated by any ASP.NET server controls, however, I believe you can easily inherit from the 2. label
<label for="FirstName">Full Name</label>
<input id="FirstName" type="text" />
Gender:
<label for="male">Male</label>
<input id="male" type="radio" name="gender" />
<label for="female">Female</label>
<input id="female" type="radio" name="gender" />
The In addition to providing a caption for the element, ASP.NET generates this element for the Text property of the 3. fieldset/legend
<fieldset>
CP is a good place to publish XHTML related articles.
</fieldset>
<fieldset>
<legend>Personal Information</legend>
<label for="FirstName">Full Name</label>
<input id="FirstName" type="text" />
Gender:
<label for="male">Male</label>
<input id="male" type="radio" name="gender" />
<label for="female">Female</label>
<input id="female" type="radio" name="gender" />
</fieldset>
The In ASP.NET 2.0, there is a new attribute 4. col/colgroup
<table border="1">
<colgroup>
<col width="150px" />
<col width="10px" />
<col width="220p" />
</colgroup>
<tr>
<td valign="top">1</td>
<td> </td>
<td>2</td>
</tr>
<tr>
<td>3</td>
<td> </td>
<td>4</td>
</tr>
</table>
The The advantage of using the For cross-browser issues, use the Sadly, the ASP.NET's 5. acronym
<acronym title="Code Project">CP</acronym> is a good place to publish
<acronym title="Extensible HyperText Markup Language">XHTML</acronym>
related articles.
The By default, IE 6 doesn't show any sign on the text surrounded by this element; however, Firefox displays a dashed line under it. Both browsers display a tool tip of the full meaning whenever you stop your cursor over it. If you like this element, have a look at the ConclusionI have spotted some elements that I thought need to have extra light on; however, there are more hidden elements to spot like This article served as a quick reference for each element; for a full list of the attributes and usage, try the W3 Schools, htmldog.com, and you can always go back to the official documentations at the World Wide Web Consortium. If you found the contents of this article useful, then please remember to vote. History
| ||||||||||||||||||||