Jump to content

Archived

This topic is now archived and is closed to further replies.

knowram

html Standards?

Recommended Posts

i have taught myself web programing and it I am starting to realize that I have missed some of the standard things. I have been using Golive to do most of the non php work and when I upgraded last they added some things. Here is what it added.
[code]
<!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">
[/code]
Do you need that stuff and if so what is it?
Also It has started putting <p></p> at the beginning and end of each line. What is that about?

Thanks for any help

Share this post


Link to post
Share on other sites
First you need to understand what a DOCTYPE is. Then you need to understand why you need one, and which one you need.  http://alistapart.com/stories/doctype/ explains what you need to know.

And yes, you do need 'that stuff'.

Adding paragraph tags around every line of text sounds like a dumb editor not a smart editor, or a misuse/misunderstanding of the program.

Share this post


Link to post
Share on other sites
Thanks that helped allot. Now I know what they are. But now I am not sure which one to use. My site is really simple consisting of tables, submit buttons, and php. I am guessing that I need to use one of the HTML 4.01 Strict, Transitional, Frameset DOCTYPES but I don't know which of the three to use.

Share this post


Link to post
Share on other sites
Use [i]X[/i]HTML. Transitional will do fine, but if you use Strict, there will be less things allowed (such as using the align attribute). Use Frameset on a page where there is a frameset.

I'm not really sure if there is any benefits of using Strict instead of Transitional.

You can validate your code agains the DOCTYPE you chose at http://validator.w3.org

Share this post


Link to post
Share on other sites
The Validating page is cool that will help me allot thanks. However I am having trouble figuring out how to salve all the problems that it is coming up with. And I am still not sure what DOCTYPE I should be using. my site is a mix of html php and javascrip. her is my home page which is what I am starting with http://emr.envisionhealth.org

thanks for any help

mod edit to working URL

Share this post


Link to post
Share on other sites
end tag for "img" omitted

fix that thus by closing the tag with /:

[code]<img src="whatever.gif" height ... width ... alt ... />[/code]

there is no attribute "height" - I assume that's in a table.  There is no height attribute for a table, the height is dictated by the content.

background not allowed in the DOCTYPE you selected. Use the CSS equivalent. Example:

[code]<table style="background-image: url(images/whatever.gif);" .....>[/code]

And the undefined csactiondict and clones - no idea what those are, but they sure aren't html elements. Probably something invented by your web page editor.

Share this post


Link to post
Share on other sites
[quote author=AndyB link=topic=104825.msg418576#msg418576 date=1156006705]
there is no attribute "height" - I assume that's in a table.  There is no height attribute for a table, the height is dictated by the content.
[/quote]

You could use the min-height CSS property, but since IE don't have full CSS support, it don't work in IE, there is some sort of workaround though (can't remember where I read it).

Share this post


Link to post
Share on other sites
[quote author=Daniel0 link=topic=104825.msg418820#msg418820 date=1156066707]
You could use the min-height CSS property, but since IE don't have full CSS support, it don't work in IE, there is some sort of workaround though (can't remember where I read it).
[/quote]

.. and that works with Safari as well - > http://www.mezzoblue.com/archives/2004/09/16/minheight_fi/

Share this post


Link to post
Share on other sites
Using XHTML Strict also fixes the way that IE6 interperts the box model.  Everything with padding, borders and margins will render the same as in FireFox using strict. 

What is it with IE anyway?

Share this post


Link to post
Share on other sites
To be fair I actually think IE got the box model right!!!!!

Their method of implementing width etc is far more intuitive than the standards IMO.

That said IE hisses me off in so many other ways that I still don't like IE5-6 very much at all.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.