WebDev:FrontendCodeStandards: Difference between revisions

Line 19: Line 19:


=== Code Standards ===
=== Code Standards ===
* HTML should validate. Not a strict requirement. Some layouts can't be achieved without a few errors.
* Layered semantic markup
* Layered semantic markup
** Semantic class/id names and appropriate HTML tags for content
** Semantic class/id names and appropriate HTML tags for content
Line 27: Line 26:
* HTML:
* HTML:
** XHTML 1.0 strict doctype (we might want to move to HTML 4.01 strict if we are serving XHTML as html/text)
** XHTML 1.0 strict doctype (we might want to move to HTML 4.01 strict if we are serving XHTML as html/text)
** Pages must validate
** Pages must validate. Not a strict requirement. Some layouts can't be achieved without a few errors.
** Use most meaningful tags for content
** Use most meaningful tags for content
** Images/bg images with text in them must have alternate textual representation (alt text or text positioned offscreen for screenreaders).  Avoid these due to L10n difficulties anyway.
** Images/bg images with text in them must have alternate textual representation (alt text or text positioned offscreen for screenreaders).  Avoid these due to L10n difficulties anyway.
975

edits