Jump to content


Photo

html Standards?


  • Please log in to reply
9 replies to this topic

#1 knowram

knowram
  • Members
  • PipPipPip
  • Advanced Member
  • 226 posts

Posted 19 August 2006 - 02:26 AM

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.
<!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">
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

#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 19 August 2006 - 02:32 AM

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.
Legend has it that reading the manual never killed anyone.
My site

#3 knowram

knowram
  • Members
  • PipPipPip
  • Advanced Member
  • 226 posts

Posted 19 August 2006 - 03:12 AM

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.

#4 Daniel0

Daniel0
  • Staff Alumni
  • Advanced Member
  • 11,956 posts

Posted 19 August 2006 - 09:34 AM

Use XHTML. 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

#5 knowram

knowram
  • Members
  • PipPipPip
  • Advanced Member
  • 226 posts

Posted 19 August 2006 - 04:45 PM

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

#6 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 19 August 2006 - 04:58 PM

end tag for "img" omitted

fix that thus by closing the tag with /:

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

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:

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

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.
Legend has it that reading the manual never killed anyone.
My site

#7 Daniel0

Daniel0
  • Staff Alumni
  • Advanced Member
  • 11,956 posts

Posted 20 August 2006 - 09:38 AM

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.


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).

#8 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 21 August 2006 - 03:41 PM

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).


.. and that works with Safari as well - > http://www.mezzoblue...6/minheight_fi/
Legend has it that reading the manual never killed anyone.
My site

#9 dustinnoe

dustinnoe
  • Members
  • PipPipPip
  • Advanced Member
  • 187 posts
  • LocationWarner Robins, GA

Posted 04 September 2006 - 09:52 AM

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?

#10 ToonMariner

ToonMariner
  • Members
  • PipPipPip
  • Advanced Member
  • 3,342 posts
  • LocationNewcastle upon Tyne, UK

Posted 04 September 2006 - 02:12 PM

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.
follow me on twitter @PHPsycho




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users