
Using standards compliant code improves interoperability of web-related products. For accessibility this means that assistive technology can also access the content of a web page.
The current VET recommended standard for web content is XHTML 1.0 Transitional. See New Generation Technologies for Learning - Technical Standards - Content Formats
XHTML is a stricter and cleaner version of HTML.
For the XHTML code to be standards compliant, it must follow the XHTML rules (Opens in new window) specified by the World Wide Web Consortium (Opens in new window) (W3C). Also see XHTML tag reference (Opens in new window).
A doctype declaration must be included at the very top of the HTML document. This specifies what version of the HTML is being used. As the recommended standard is XHTML 1.0 Transitional, the following doctype declaration must be used.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">This will assist users navigating webpage content with assistive technology by ensuring the structure of the page is available to the technology.
Use element tags for the purpose they were intended. The following elements are commonly used (and misused) elements.
For a full list of elements see the W3schools XHTML 1.0 Reference (Opens in new window). XHTML is the recommended standard for VET web content (for more information on standards see Use standards compliant code within this guide).
<p></p> See Headings - Headings must be marked up with the 'heading' element, and no level should be skipped.
<blockquote></blockquote> See Lists.
XHTML tag to define a table:
<table></table>XHTML tag to define a row in a table:
<tr></tr>XHTML tag to define a table cell as a header:
<th></th>XHTML tag to define a table cell:
<td></td>All table elements must be contained within the <table> tags, and all table cell tags must be contained within the <tr> (table row) tags:
<table>
<tr>
<th></th>
</tr>
<tr>
<td></td>
</tr>
</table> See Tables for more information on associating headers with cells for the benefit of screen readers.
<em></em> or <strong></strong> See Forms
The structure of the content should be created using XHTML. Presentation and layout of the content should be generated through a stylesheet. This allows the presentation to be turned of if it is not relevant to the requirements of the user. Separating these elements also means that the presentation and layout can be determined programmatically by assistive technology.
Presentation and layout should be generated by an external style sheet. The benefits of separating the presentation of your content from the structure of your content include:
For a basic introduction to Cascading Style Sheets see w3schools.com - CSS Introduction (Opens in new window)
The following is required to reference an external style sheet in the head section of XHTML code:
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css"/>
</head>
<body>
</body>
<html>
A common error is to use tables to lay out the content of a web page. Tables should be used to display data only.
This assists users navigating a site with a keyboard and assistive technologies.
Any functionality created through scripts should be available to assistive technology and key board navigation.
The WebAIM site provides a good tutorial for JavaScript - WebAIM.org - Creating Accessible Javascript (Opens in new window).