Writing Good Code?

The better you code, the more efficient, flexible, consistent your site will be. Consult http://www.w3.org for guidelines and standards.
One of the most important recommendations of HTML 4.0 is the separation of structure and style.
With style sheets, you can separate the structure of a web page from its design. As a result, you can control a document’s presentation in ways HTML can’t.

Deprecated Tags
Deprecated refers to those HTML tags and attributes that should be phased out in favor of style sheets.
Good pages to look up depracated tags http://www.codehelp.co.uk/html/deprecated.html and
http://www.w3.org/TR/html4/index/elements.html

Is it a good idea to avoid using deprecated tags?
Yes

What does it mean to separate style and structure, and why is it important?

Means to define the presentation of structural elements outside the code as often as possible. This is done with CSS.

Advantages of CSS

  • Cleans up HTML.
  • Improves the ability of search engines to locate pages.
  • Makes sites easier to maintain and update.
  • Speeds up documents.
  • Makes pages easier to render in multiple browsers and devices.

XHTML (Extensible hypertext markup language)

XHTML is a strict version of HTML that shares the requirements of well-formedness with the “meta-languages” XML (Extensible Markup Language) and SGML (Standard Generalized markup language).

Advantages of XHTML

  • XHTML enforces good coding practices.
  • XHTML uses all lowercase tags.
  • XHTML uses quotes "value" for all attribute values.
  • All XHTML element must have closing tags.
  • All XHTML must be properly nested.
  • A valid XHTML conforms to one of three DTDs: strict, transitional, or frameset.
  • Doctype declartion is required.

Why?
Because of the future hand held devices, appliances and other electronics will make more use of the internet.

XHTML Utilities

  • W3 offers a utility called “Tidy” that you can use to clean up your code without having to pour through it all and change the code to conform to XHTML.
  • “Tidy GUI” is a windows version of the program.
  • So how do you transform HTML to XHTML?

 

UCCS Ingeniux Users' Group List: