Difference between revisions of "HTML Good Practice"
m (Matthew's Rule moved to HTML Good Practice) |
|||
(3 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
===Rule 1=== | ===Rule 1=== | ||
− | + | Your webpages must be constructed from the Standard Structure as shown in [[HTML:Basics]] - always include the header at the top of every page | |
===Rule 2=== | ===Rule 2=== | ||
Line 15: | Line 15: | ||
===Rule 6=== | ===Rule 6=== | ||
− | Combination tags must be closed correctly - tags <nowiki><A><B><C></nowiki> must be closed in the | + | Combination tags must be closed correctly - tags <nowiki><A><B><C></nowiki> must be closed in the first in, last out order <nowiki></C></B></A></nowiki> |
===Rule 7=== | ===Rule 7=== | ||
Line 34: | Line 34: | ||
===Rule 12=== | ===Rule 12=== | ||
Use CSS effectively - CSS should be used correctly and effectively - don't include a single CSS command in an external style sheet and then only use it once on one page - this is inefficient. | Use CSS effectively - CSS should be used correctly and effectively - don't include a single CSS command in an external style sheet and then only use it once on one page - this is inefficient. | ||
+ | |||
+ | ===Rule 13=== | ||
+ | Don't steal Bandwidth! - other website owners pay for the download traffic - you cause them financial cost if you include multimedia in your site that is hosted on theirs. |
Latest revision as of 13:04, 18 October 2007
Rule 1
Your webpages must be constructed from the Standard Structure as shown in HTML:Basics - always include the header at the top of every page
Rule 2
Use <BR> sparingly - use CSS or tables or <P> or something more appropriate to layout than to just add a load of <BR> tags
Rule 3
Use <STRONG> or CSS, not <B> - the <B> tag is no longer used in HTML 4.01 - use the more up to date versions of tags
Rule 4
Use <EM> or CSS, not <I> - the <I> tag is no longer used in HTML 4.01 - use the more up to date versions of tags
Rule 5
Do not underline text unless it is a hyperlink - use something else like layout or colour to emphasise something important
Rule 6
Combination tags must be closed correctly - tags <A><B><C> must be closed in the first in, last out order </C></B></A>
Rule 7
Use fonts changes sparingly and carefully - overusage of fonts in a webpage makes the page difficult to follow, use font changes only to signify or seperate important information, and keep the total number of fonts to a minimum - remember, not everyone has the fonts you have.
Rule 8
Font sizes should be proportional, not fixed - using proportional font sizes puts the user in control of the browsing experience - a user that feels in control is much more likely to use your webpages longer and more productively.
Rule 9
ALT text on all images - you should ensure your images have ALT attributes so that any browsers that are not rendering the images of the page have a description of what the image should be. This is also critical for screen reading software.
Rule 10
Speech marks around attribute values - HTML 4.01 specifies that all values of attributes should be enclosed with speech marks. The only possible exceptions are where the values are integers (whole numbers) without any symbols or letters.
Rule 11
All HTML code must be correctly indented - Indentation helps both the original author with maintenance, and any potential authors that might edit the pages in the future.
Rule 12
Use CSS effectively - CSS should be used correctly and effectively - don't include a single CSS command in an external style sheet and then only use it once on one page - this is inefficient.
Rule 13
Don't steal Bandwidth! - other website owners pay for the download traffic - you cause them financial cost if you include multimedia in your site that is hosted on theirs.