Tuesday, July 7, 2009

Revisiting and Revising html 4.01 Code

Errors, and invalid code mixing between html and xhtml has cause me to stop in place with any new content development and revisit all the current uploaded pages on the site to make any necessary corrections. One big issue I ran into was the Encoding error that I detected using the w3c validation service.

Such a minor mistake, but often catastrophic in the coding world was the content-type declaration, where I had the following: charset=ISO-8859-1. Turns out in both html 4.01 and xhtml 1.0, the ISO in this instance can not be capitalized, it must be: charset=iso-8859-1. If it is not, web browsers will default to using windows-1252 in my case. So any formatting items maybe lost for this silly mistake.

I also unfortunately mixed both html and xhtml code which has caused a lot of errors, event to the extent where some pages are defaulting to the doctype: -//W3C//DTD HTML 1.0 Transitional//EN rather then the html 4.01 or xhtml 1.0 versions I had intended.

No comments: