Articles → .NET → ASP.NET XHTML Compliance
ASP.NET XHTML Compliance
- All elements either include an explicit closing tag or are self-closing
- Tag and attribute names are rendered in lowercase, and attribute values are included in double quotation marks.
- Formatting information is rendered using only cascading style sheet styles.
- In ASP.NET, if controls generate IDs, as occurs in the Repeater, GridView, and other controls the format of the IDs match XHTML 1.0 Transitional guidelines.
Click to Enlarge
- form elements include a name attribute
- XHTML requires all elements to be enclosed in a container element. such as input elements, are rendered in div elements.
- ASP.NET encodes characters, such as & (for example, as & amp;).
- If ASP.NET renders script blocks, the content of the script blocks is rendered inside an XML (HTML) comment.