HTML CSS basic Question
Hello webmasters,
I am modifying a template that was built for mambo and trying to make it more suitable for my intentions.
I have modifed the layout a bit by adding a table to control some placement as there were some DIV tabs embedded in other DIV tags and I could not really see what was happening in the code, but it did not look right on the screen.
Well the question is what does the following line of code mean and do to the template and broswer?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
I am not sure the template is still xhtml compliant with the small changes I made. Is that code above needed and does it do anything to the browser? what happens if I just remove it?
thanks,
Busy posted this at 09:40 — 23rd November 2005.
He has: 6,151 posts
Joined: May 2001
It tells the browser yo'd like it displayed in XHTML
w3c.org is a validation service, run your URL through it and you are able to make your site XHTML valid once more.
Megan posted this at 14:36 — 23rd November 2005.
She has: 11,421 posts
Joined: Jun 1999
As Busy said, the doctype tells the browser how you want the page to be displayed. There can be some slight variations in display (especially in modern browsers) depending on the doctype. So if you changed that to xHTML strict (instead of transitional), some browsers might interpret some things differently.
Here's a reference:
http://www.alistapart.com/stories/doctype/
Megan
Connect with us on Facebook!
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.