Skip to content

Project: HTML best practices #115

@estelle

Description

@estelle

All HTML examples should follow best practices.

Media

  • All images should include an alt attribute
    • Create spreadsheet of missing alt attributes
  • All images should aslo include a height and width (newer best practice)
  • All audio files should have a transcript, captions, and description
  • All video files should have a transcript
  • Video and audio should have autoplay=off (not sure this is necessary anymore)

Form elements

  • No form control should exist without an associated label

    • checkbox
    • radio
    • hidden
    • text
    • password
    • tel
    • number
    • color
    • range
    • date/time
    • select
    • textarea
  • Every form control should have an id (except in the rare case where implicit labels are used)

    • checkbox
    • radio
    • text
    • password
    • tel
    • number
    • color
    • range
    • date/time
    • select
    • textarea
  • All input elements should include a name (and value if needed)

    • checkbox (value recommended)
    • radio (value required)
    • hidden (value required)
    • text
    • password
    • tel
    • number
    • color
    • range
    • date/time
    • select
    • textarea
  • All checkboxes, radio buttons, and hidden input types should also include a value

    • checkboxes and radio buttons should be inside <fieldset>s
    • [ ]
  • HTML docs should be standards compliant

    • doctype
    • html element should include a lang attribute.
    • charset
    • title
    • viewport meta
  • Type attribute is NOT needed

    • script
    • stylesheet

Required attributes, elements, and content

  • Ensure abbr has a title attribute unless the abbreviation is preceded or followed by the definition.
  • Ensure all links have adequate content ("click here" is a no-no).
  • Every <table> should have a table <caption>
    • in code examples
    • in markdown (how is this done?)

Deprecated content

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions