4.01 or 3.2 ?

They have: 5,633 posts

Joined: Jan 1970

When I first learned HTML (3 years ago) I learned in version 3.2. Aparently there is a version 4.01 that I havent even looked into yet. I have read a little into it and aparently the newer version is all about css and attrbutes and gets rid of the useless tags like , and tags.

So....
What version do you use and do you have any comments or suggestions?

demonhale's picture

He has: 3,278 posts

Joined: May 2005

hey I still use tags of 3.2, in 4.01 the tags you mentioned are not entirel gone, just depreciated... Anyways, if your site validates in w3c html4.01, then its a good chance that youre already complying with the 4.01 standard...

chrishirst's picture

He has: 379 posts

Joined: Apr 2005

3 years ago HTML 3.2 was already 6 years out of date.

and deprecated tags will validate with a transitional DTD

Busy's picture

He has: 6,151 posts

Joined: May 2001

After 4.01 came XHTML (the version suggested use of CSS with it) which was released back in the year 2000

It's easier (and makes more sense) to work in XHTML and CSS as these are the latest versions.

Note: XHTML and CSS are two totally different things, CSS is NOT part of XHTML.
Is like a finger and a thumb, totally different but work well together

Megan's picture

She has: 11,421 posts

Joined: Jun 1999

What busy said Smiling Definitely go with xHTML and CSS. Best to learn now and get into good habits as soon as possible.

I like the finger and thumb analogy.

They have: 5,633 posts

Joined: Jan 1970

So HTML is dieing and XHTML Is talking its position as king of the hill?
I have been thinking about getting into to It but not sure yet.

Megan's picture

She has: 11,421 posts

Joined: Jun 1999

Yes. It's already happened - HTML is a thing of the past Smiling xHTML isn't all that different - same thing, just stricter about certain things.

demonhale's picture

He has: 3,278 posts

Joined: May 2005

Yeah Strict as well as getting used to closing tags with another slash other than the first one...

Roo's picture

She has: 840 posts

Joined: Apr 1999

XHTML:

• All lowercase
• Tags that were not previously closed are now closed
• Will NOT allow errors (This is a GOOD thing!) Example...all attributes must be encased between quotes or they will not display....

Roo

They have: 5,633 posts

Joined: Jan 1970

Ok, I will be looking into it starting tonight. Aparently I need to start paying more attention to new techonlogies. Any suggestions on what would be the best source for tech news?

BTW is a xhtml document *.xhtml rather than *.html ?

Megan's picture

She has: 11,421 posts

Joined: Jun 1999

bja888 wrote: Ok, I will be looking into it starting tonight. Aparently I need to start paying more attention to new techonlogies. Any suggestions on what would be the best source for tech news?

Just keep haging around here, and pay attention! Laughing out loud

chrishirst's picture

He has: 379 posts

Joined: Apr 2005

Quote: BTW is a xhtml document *.xhtml rather than *.html ?

No, But then a HTML document is not always .html

HTML refers to the content of the document.

Chris

Indifference will be the downfall of mankind, but who cares?
Venue Capacity Monitoring
Code Samples

JeevesBond's picture

He has: 3,956 posts

Joined: Jun 2002

There are a few conceptual differences between the two. For instance you're meant to entirely seperate code from layout. XHTML is an XML application and is therefore semantic Smiling

a Padded Cell our articles site!

He has: 388 posts

Joined: Apr 2005

Im learning it and its no so diffrent from proper html 4.01.
It will be hard to adjust if you capitalise your html but luckily I dont.

They have: 5,633 posts

Joined: Jan 1970

I spent about 2 or 3 hours last night convirting a page of mine to xhtml 1.0 Strict and there is one lasp proublem I am haveing with images not stretching. Take a look and tell me whats I am missing? I already checked the validator and I got 0 errors (for the first time ever)

http://www.optimalsource.biz/biz/about/?test=true
it should look like this...
http://www.optimalsource.biz/biz/about/

Busy's picture

He has: 6,151 posts

Joined: May 2001

strict isn't the best to use when you use tables for design (although it can be done).

Use transtitional to start with, then once you get the hang of CSS move on to strict.
It's really a waste of time using style="....." in html tags, CSS is meant to be a portable language so make class's and id's in a .css file and use class="classname" in your html tags, this way if you ever need to adjust something you just change your .css file and the whole site can be updated.

note, the page it should look like doesn't line up properly in firefox - the featured product title and image are over lapping

They have: 5,633 posts

Joined: Jan 1970

In both firefoz and IE its giveing me the same basic errors. I tried useing transtitional and look was basicly the same. I must be missing a style like margin or something.

demonhale's picture

He has: 3,278 posts

Joined: May 2005

Ok ion your second area on the table definitions you should add something like this:

Do this for all table definitions... Ignore color...

Busy's picture

He has: 6,151 posts

Joined: May 2001

demonhale wrote: Ok ion your second area on the table definitions you should add something like this:

Do this for all table definitions... Ignore color...

bordercolor is an IE element.
It is not wise to mix HTML and CSS like that, one or the other.

Tables should not have a height, td's can however
Width should be set as html - width="95%" no need to use CSS for that
border-collapse and bordercolor should be set as a class element and controled via CSS, even the border and padding/spacing can be controlled via CSS (margin/padding).

It should be set out like:
or

Keep in mind a table with a width less than 100% will have issues with things under it, they may appear above or beside it if you do not clear the gap, either using a hr, clear all, larger table, div, or p etc

They have: 5,633 posts

Joined: Jan 1970

Busy wrote: Width should be set as html - width="95%" no need to use CSS for that

That's what I wanted to do but I wanted the page to work in strict. And the validator was yelling at me for every attrabute except css based ones. So I took out all the html vaules and replaced them with style tags.
I noticed browsers arnt very agreeable when it comes to adding height attrabutes. I am tring to get out of the habit of useing them.

Megan's picture

She has: 11,421 posts

Joined: Jun 1999

Quote:

All of that sould go in your css. Like this:

.tableclass {width: 95%; border-collapse: collapse; padding: 0; border: 1px solid #111111;}

Then all you have is

Best to do as much as possible in CSS.

They have: 5,633 posts

Joined: Jan 1970

table{padding:0px;margin:0px;outline:0px;border-collapse:collapse;}' this is what I been useing.
The idea is to get rid of the lines not to make more. I added "border:0px;" and still no luck.

And I moved it so I can make a "about us" page in html.
http://www.optimalsource.biz/biz/about/xindex.aspx?test=true

Megan's picture

She has: 11,421 posts

Joined: Jun 1999

Yes, in strict there should be no attributes, all CSS. Start with transitional and work up. You're right about height - best to avoid it. Oh, and also best to avoid inline CSS as much as possible. Use an external stylesheet with classes and ID's as appropriate.

demonhale's picture

He has: 3,278 posts

Joined: May 2005

The code can be modified, but I tried it out and substituted it removes the spaces...
I said ignore color, as well as other no-use codes, I just mentioned a complete line which was already on the codes of the page of bja...

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.