HTML checklist
Habeas corpus
When preparing HTML to go into the database, the first thing to remember—whatever the source of the HTML—is that we are only concerned with what is between the <body></body> tags. This is the only part of any HTML document which will be copied into the database.
What follows is a list of things to do, things to notice, and things to don't do.
-
Things to do
set all tags lowercase
quote all attribute values
set<br />tags with a space before the slash
use<h2>headings</h2>to create a hierarchy
start headings at<h2>level 2</h2>because the title field becomes level 1
use lists wherever they are useful
use ordered lists when the list is in number order
wrap abbreviations in<abbr. title="Abbreviation">ABBR</abbr.>tags, with a value
set any äççêñténtëd character using named entities
validate the page code -
Things to notice
it doesn't matter how the text wraps in the editor, as long as the tags are correct
tabs don't work, they're converted to spaces (and runs of spaces are reduced to just one space)
simple mark-up works better than complicated mark-up
it's easier to tag things as you're going
-
Things to don't do
don't use
<br />tags to wrap paragraphs, wrapping will look after itself
don't set any word in ALL CAPITALS unless it really is an abbreviation or acronym
don't create file names with commas, spaces, full stops, or any punctuation other than _ or—
don't create file names longer than 32 characters including the extension
don't construct headings out of paragraphs, bold tags and capital letters
don't even think about constructing lists out of middots and breaks
don't use<i></i>for emphasis, use<em></em>
