Re: Size optimization of a HTML document

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday 29 November 2005 17:53, Welty, Richard wrote:
> also, what are you validating to? i'd suggest that if you're doing this
> sort of cleanup, you should look at html 4.01 or xhtml 1.0 as your
> target. writing strict xhtml 1.0 that works in older browsers takes a
> little care, but it's not outrageously difficult.

I am a php developer and use exclusively Quanta.  However I rely for 
validation on http://validator.w3.org/ 

While it is true that often you get a cascading effect in regards to errors, I 
find that the w3c validator provides enough explanation to fix them.

I do not know the reason why you validate your documents but know this: 

When a document is 100% valid, and it breaks in a browser, you can point and 
say "it's the fault of the browser".  As long as your document isn't 100% 
valid, the browser will try to interpret your code as best it can and make 
assumptions on how to render it.

Also know that each html document starts with a document type declaration.  In 
Quanta, click the DTD menu, choose "Change the DTD", select your DTD and 
check the box marked "Convert the document to the selected DTD" before 
pressing OK (not that "convert" only means change the doctype, not convert 
the whole document)

Lastly, although unrelated, a final tip.  Each browser has default values for 
font sizes, fonttypes, background colors etc, when using stylesheets, and 
doing something like

body {font: 10pt; color: white; }

Then each browser will use its default font and background color.  What if the 
browser the user is using defaults to white background?

So rule of thumb, always define all font sizes, colors, heights, etc you are 
using.  It will make sure that your document looks good on all compliant 
browsers.


With kind regards


Andy


-- 
Now listening to Top! Radio Live www.topradio.be/stream on amaroK
Geek code: www.vlaamse-kern.com/geek
Registered Linux User No 379093
If life was for sale, what would be its price?
www.vlaamse-kern.com/sas/ for free php utilities
--

Attachment: pgpLk03TarB6I.pgp
Description: PGP signature


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux