Best Practices

Page structure

  1. Organize page into sections and subsections.
  2. Use proper headings.
  3. Close tags.
  4. Wrap attribute values with double quotes.

Naming conventions

  1. Use lowercase letters for directory names and filenames. Connect words with underscore, not blank space.
  2. Use .html or .htm as file extension for HTML, .css for style sheets.
  3. Use lowercase letters for elements and attributes.

Lines

  1. Add blank lines for logical grouping.
  2. Use two-space indentation, don't use tab.

Colors and images

  1. Don't use too many colors in a single page.
  2. Make sure text contrasts well with background.
  3. Choose correct image format and size.
  4. Provide alternative text for images.