...

View Full Version : question for html & CSS



imtlm24
10-03-2006, 11:30 AM
in layout css , if remove
<!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"> and replace
<html>, what the happen ?

and between
<!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">
and

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html> what different ?
sorry because my english not okie :D, sorry , thanks you very much

mark87
10-03-2006, 01:55 PM
A doctype tells the browser how it should render the page. Without one you'll find browsers will interpret coding differently and it will make life very hard when trying to get your page looking 'right' amongst all browsers! You need a doctype to have a valid page; don't ever leave it out ;) .

As for the difference between XHTML and HTML, have a quick glance at http://www.w3schools.com/xhtml/xhtml_html.asp . XHTML is basically the next step from HTML and is rapidly replacing it, a lot of tags from HTML are deprecated in XHTML (say goodbye to <font> and <center> !) and there is a much stronger emphasis on seperating style from content. Googling the differences between them will reveal many sites which should go into more detail about it. :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum