Sunday, August 25, 2013

Minimalism

Minimalism is any design or style in which the simplest and fewest elements are used to create the maximum effect.
 ~ Wikipedia, the free encyclopedia
Whenever I set down to code a project, I have a core collection of 9 reference books to keep me on the straight and narrow; someday I'll have to tell what books those are but for the present you only need to know there are 9 of them.  In addition to the books I also have two websites up - php.net and www.w3schools.com/.  While php.net is self explanatory, w3schhols is up because I find it to be a fast, easily accessed (X)HTML reference.

I was skimming through w3's HTML 5 section the other day when a 'minimum HTML5 document' caught me eye and which I have reproduced below.

<!DOCTYPE html>
<html>
<head>
<title>Title of the document</title>
</head>

<body>
The content of the document......
</body>

</html>

 As a web savvy spider, I can tell you the above document is not a minimum document in any definition of the term.  If we define minimal as the least number of tags to still render a page, I know for a fact that only 82% of the documents published on the web and purported to be HTML have a doctype statement, and I know the title tag is not needed either.

If we define minimal as the minimum number of tags to create a valid HTML document, this document, again, does not measure up because it doesn't declare a charset and therefore is not a valid HTML 5 document'

Evidently, one of the biggest secrets in web site authoring is the w3c Markup Validation Service where (X)HTML markups can be compared to their doctype and be found either valid, or not.  If not, they give you a list of the problems.  It will even upload and check a file so you don't even need to publish it. How easy is that?


To make the above 'document' a minimal HTML 5 document that actually validates, a meta tag needs to be added.

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Title of the document</title>
</head>

<body>
The content of the document......
</body>

</html> 

No comments:

Post a Comment