3 Pages V  1 2 3 >  
Reply to this topicStart new topic
> doc type help

Founder & Administrator

Group Icon
Group: Admin - Top Level
Joined: 29-August 02
Posts: 11,644
From: Bucks County, PA
post Jun 14 2004, 11:28 AM
In a small biz Group called The Creative Enterprises Network Board that I belong to, someone is asking about doc types. This is something I'm just now getting interested in myself. I could swear there was a good instructional thread on this here. Was there?

Can anyone point out a primer type of thread or link anywhere (here or somewhere else) that non-technical people would be able to use?

Thanks a bunch!
Offline Go to the top of the page

Moderator Alumni

Group Icon
Group: Hall Of Fame
Joined: 27-January 03
Posts: 3,438
From: Brighton, UK
post Jun 14 2004, 11:30 AM
I don't know if it's good, or if non-technical people can use it, but I wrote one ... http://www.ilovejackdaniels.com/Design/DTDs_Explained
Offline Go to the top of the page

Founder & Administrator

Group Icon
Group: Admin - Top Level
Joined: 29-August 02
Posts: 11,644
From: Bucks County, PA
post Jun 14 2004, 11:46 AM
This looks perfect! I'm going to study it too, and send it to the small biz group. I'm also reading Designing With Web Standards by Jeff Zeldman, which I realize after reading some of it, I'm long overdue on learning this.

Thanks!
Offline Go to the top of the page

Moderator Alumni

Group Icon
Group: Hall Of Fame
Joined: 31-August 02
Posts: 15,634
post Jun 14 2004, 11:57 AM
Here, too:

http://www.camaban.co.uk/dtd.php
Offline Go to the top of the page

Founder & Administrator

Group Icon
Group: Admin - Top Level
Joined: 29-August 02
Posts: 11,644
From: Bucks County, PA
post Jun 14 2004, 12:10 PM
THAT's the one I remembered seeing. It was Adrian! Is it me or is it hard to read? (Small font). But, yes, another great resource. THANKS!
Offline Go to the top of the page

Moderator

Group Icon
Group: Moderators
Joined: 6-March 03
Posts: 7,962
From: Langley, British Columbia, Canada
post Jun 14 2004, 12:23 PM
Perhaps this thread should go public. I've learned much by checking what was going on here.

It even encouraged me to check how well my web pages validated with the W3C Markup Validation Tool. The answer was OK but could be better.

I now have a related problem. Many of my pages have existed many years and have evolved through the years. They say they're HTML 4.01 in the Document Declaration Tag but now have slight problems. I now use Dreamweaver MX with text editor tweaking. Dreamweaver MX would provide XHTML type code. So to my question. Is there any easy and robust way of upgrading my (?) HTML 4.01 to some variant of XHTML?
Offline Go to the top of the page

Founder & Administrator

Group Icon
Group: Admin - Top Level
Joined: 29-August 02
Posts: 11,644
From: Bucks County, PA
post Jun 14 2004, 12:27 PM
QUOTE
Perhaps this thread should go public.


I agree. Moved from the "Back room" to out front, for all members to see.

Just hope I stuck in the right place laugh.gif
Offline Go to the top of the page

Founder & Administrator

Group Icon
Group: Admin - Top Level
Joined: 29-August 02
Posts: 11,644
From: Bucks County, PA
post Jun 14 2004, 01:34 PM
My friend is grateful for the resources suggested, and has an additional question, which I think is sort of related to Barry's inquiry too.

She asks: (Asked here with her permission, so that we can all benefit from the education.)

QUOTE
I am using that book Learn HTML 3.2 in a Week for my coding.  What are the
differences in HTML 4.0?  And if I wrote an external style sheet, should I
still use the DOC TYPE code for HTML 3.2?

Should I be learning HTML 4.o or even XHTML and creating my site in that?


Any advice is appreciated. Thanks tongue.gif
Offline Go to the top of the page

Member

Group: Members
Joined: 14-November 03
Posts: 34
From: Yorkshire, UK
post Jun 14 2004, 04:45 PM
Answer to the last question first: yes, learn HTML 4, as it will save unlearning in the future. The reason being that a lot of the tags in HTML 3.2 are deprecated, meaning that in time they're going to slip out of use. Whilst it hasn't happened yet, the Web is already moving towards XHTML, the stage after HTML 4.

Doctypes are only mandatory for XHTML, so you don't have to put a Doctype in for HTML 3.2.

If you DO use a Doctype, there are only two choices in this case - transitional (allowing the use of depcrecated tags) and frameset (which allows deprecated tags and also frames). However - that's for HTML 4.0 - the book I'm reading considers HTML 3.2 to be essentially not of much use.

So best to assume that you're going to write in HTML 4 ! :-)

In which case, writing in HTML 4, put in a transitional Doctype. The browser will then assume that you have written your page according to those doctype specifications.

Because browsers in the past were quirky (the great Netscape and IE wars, each doing what they damned well pleased, and never mind such things as standards) many pages were hacked about to achieve what the designers wanted in each browser. These pages still exist out there. They don't conform to any standards. But the browsers will display them correctly if they don't come across a Doctype. (This is known as 'quirks' mode). So if you don't know (or care) what the transitional specifications are, just write your pages as you normally would, forget the Doctype declaration, and check your pages in the main browsers to see what they look like.

All this from my bible, 'HTML for the world wide web' (with XHTML and CSS in great detail) by Elizabeth Castro.

Richard
Offline Go to the top of the page

Founder & Administrator

Group Icon
Group: Admin - Top Level
Joined: 29-August 02
Posts: 11,644
From: Bucks County, PA
post Jun 14 2004, 08:23 PM
QUOTE
Answer to the last question first: yes, learn HTML 4, as it will save unlearning in the future. The reason being that a lot of the tags in HTML 3.2 are deprecated, meaning that in time they're going to slip out of use. Whilst it hasn't happened yet, the Web is already moving towards XHTML, the stage after HTML 4.


For those who may be wondering, while reading this thread, are there recommendations for sites or books for learning HTML 4? How important is it to go beyond, to XHTML? (Does the answer depend on the type of site, for example.)

This is all very good information. Thank you!

Kim
Offline Go to the top of the page

Moderator Alumni

Group Icon
Group: Hall Of Fame
Joined: 27-January 03
Posts: 3,438
From: Brighton, UK
post Jun 15 2004, 03:38 AM
In response to Richard's post ...

You never actually need to put in a DTD. If you don't, the browser will render a page in quirks mode, as you say. Good practice, though, is always to use one so that the user agent knows what languagethe page is written in and can display it correctly (if it knows how to). Web pages will always render without a DTD - though perhaps not as intended - and will always fail validation without one, regardless of language. There are also three types of DTD for HTML 4 and XHTML 1.0. The others all have just one DTD. The three variants are Strict, Transitional and Frameset.

As far as whether learning HTML 4 or XHTML 1.0 or 1.1 goes, I'd say go for XHTML 1.1. If you're going to learn something new, learn the current standard. Technology is going to go forward, not stand still. XHTML 2 is in the works, and looking funky. It depends what your friend wants though - it's not a huge leap to HTML 4 from 3.2, so she might find that easier and quicker, and those might be decisive factors for her...
Offline Go to the top of the page

Moderator

Group Icon
Group: Moderators
Joined: 29-August 02
Posts: 5,751
From: Bristol, UK
post Jun 15 2004, 04:02 AM
QUOTE
Is it me or is it hard to read? (Small font).
:oops:

Yuhuh, I guess it is, forgotten I'd set that to 0.8em, might change that soon I think, heh, a beauty of CSS, I'll be able to change that one mention of the text size for both those columns and the whole site will adjust wink-2.gif

As far as the HTML3.2 is concerned, woah! Didn't know anyone was still using that!

Personally I'd suggest going straight to XHTML1, I think thats going to beocme the standard of choice for some time to come. XHTML2 is on the books, but not backwards compatible at all, and I think that will take things too far away from the ability of many designers. HTML/XHTML aren't THAT difficult to learn, but by the sounds of it XHTML2 is heading more towards the kind of language of programmers. Not in a dynamic sense, just not nearly as intuitive as the current popular tools.

The main practical differences between HTML4 and XHTML1 are fairly minor. There is the issue of it being served as XML or text, but even I would suggest not getting into that one for the moment. Otherwise is mainly ensuring all tags are closed properly, that means lone tags like <img> become <img />. All attributes in lower case. Stricter rules on nesting. A few things that were deprecated in HTML4 are now actually gone.

X'ing HTML is my fuller attempt at explaining some of the differences (an article I should probably review to check I'm sure its still right actually) and the WDVL link at the end is a good read on that kind of thing.

Either way, I'd certainly strongly recommend at least moving up to HTML4! And using DocTypes. Its worth noting, that, as Richard mentioned, some browsers go into 'quirks' mode when no DocType is specified, however some don't! Like Opera, that always goes for full on standards mode, though they have built in a few bugs to behave like IE at times.
Offline Go to the top of the page

Moderator Alumni

Group Icon
Group: Hall Of Fame
Joined: 31-August 02
Posts: 15,634
post Jun 15 2004, 05:41 AM
QUOTE
Doctypes are only mandatory for XHTML, so you don't have to put a Doctype in for HTML 3.2.


Doctypes were around back before someone had ever considered crossing xml with html. As ILJD stated, a page will work without a document type definition, but why not include one. It tells the browser which version of html you are using.

I'd also recommend using a validator, like the one from the W3C.

There are some differences between html 3.2 and 4.01, and possibly the best thing for your friend to do is to start with the newer version. I don't see the urgency to go to xhtml 1 from html 4.01, since they are so similar, but I'm not sure that it would be harmful for you friend to start there.

The w3schools tutorials on html/xhtml/css are nice because they let people type out, and try out the examples online. That hands on approach is helpful.

http://www.w3schools.com/default.asp
Offline Go to the top of the page

Moderator

Group Icon
Group: Moderators
Joined: 29-August 02
Posts: 5,751
From: Bristol, UK
post Jun 15 2004, 08:13 AM
The WaSP's HTML Versus XHTML should give some of the pros and cons of the 2 as well biggrin.gif
Offline Go to the top of the page

Founder & Administrator

Group Icon
Group: Admin - Top Level
Joined: 29-August 02
Posts: 11,644
From: Bucks County, PA
post Jun 15 2004, 08:16 AM
QUOTE
As far as the HTML3.2 is concerned, woah! Didn't know anyone was still using that!


I know it may a surprise but it's not that uncommon. Thousands of home and small biz sites went up in the late 1990', found their niche and have been selling and surviving all these years without the need to return to their sites for much upgrading.

Now, though, competition is so severe in some cases that these sites are reaching out for help. A lot of them are run by one person who wears all the hats in the biz and has barely been able to keep up with all the changes. When they walk back out into "web design land", its a whole new landscape and they're faced with learning a lot of new technologies.

Adrian, didn't mean to embarress you about the font face, but if you can increase it a bit, it would be easier on folks like me with less than perfect vision tongue.gif

And, your writings are very good and helpful! I, too, need to brush up on XHTML. Fortunately, with Macromedia MX, it catches things while I handcode, but I still like to know.
Offline Go to the top of the page

Founder & Administrator

Group Icon
Group: Admin - Top Level
Joined: 29-August 02
Posts: 11,644
From: Bucks County, PA
post Jun 15 2004, 08:19 AM
By the way, just checked out that last doc link, and it explains a lot of the reasons for why someone would want to change from HTML 4 to XHTML, and more. Good reference, thank you!
Offline Go to the top of the page

Moderator Alumni

Group Icon
Group: Hall Of Fame
Joined: 7-November 02
Posts: 6,179
From: New England, USA
post Jun 15 2004, 08:25 AM
The HTML Cat at the Library has a few more good doctype articles in there. Among them is Activating the Right Layout Mode Using the Doctype Declaration from the Helsinki Univeristy of Technology. In there is a nice chart that shows how each browser handles each of your definitions. (You'll notice that NS/Mozilla is the most compatible with all doctypes with Opera coming in a close second).

G.
Offline Go to the top of the page

Solid Contributor

Group: Members
Joined: 15-June 04
Posts: 85
post Jun 15 2004, 08:48 AM
I am one of those small business people and thank you to Kim for posting my questions. My small business is not in web design, but when I created my site in 1997 I did it myself, not using an editor, but writing the code myself in a word processor. I also maintain my own site and have never had reason to learn new or updated coding.

Now I am starting another business and, again, working on the new website. I stumbled across all this info and wanted to do it right from the get go this time. Thus, I am finding myself needing to learn new code.

Thank you for all the book and website references. I am working through the W3schools information and for the most part (aside from using CAPS in my code), I do most of what they are already talking about. I am needing to change a few tags too. Came across a new question. I am putting in the XHTML codes and following those guidelines, but see that <center> is no longer supported. How do I center text using XHTML?

Thanks for the help it has been wonderful.

Kathy
Offline Go to the top of the page

Moderator

Group Icon
Group: Moderators
Joined: 29-August 02
Posts: 5,751
From: Bristol, UK
post Jun 15 2004, 09:05 AM
QUOTE
I am working through the W3schools information and for the most part (aside from using CAPS in my code), I do most of what they are already talking about.


Thats one of the better things about actually following the standards. If you try and stick fairly closely to them, when you come to update things, you should find you don't have quite so much to do. As with many things, getting it done right the first time saves time later on!

QUOTE
I am putting in the XHTML codes and following those guidelines, but see that <center> is no longer supported. How do I center text using XHTML?


To centre text you'll need text-align:center in your CSS for the relevant element. Possibly in the same place you're setting the font up in cases.

QUOTE
Adrian, didn't mean to embarress you about the font face, but if you can increase it a bit, it would be easier on folks like me with less than perfect vision


Purely because I'd forgotten about it Kim, I set the font rendering nearly 2 years aago now I think, and though I'm trying to get my company site text back upto at 90% normal size, I'd let my own slip by. It should be corrected when I get online this evening wink-2.gif
Offline Go to the top of the page

Founder & Administrator

Group Icon
Group: Admin - Top Level
Joined: 29-August 02
Posts: 11,644
From: Bucks County, PA
post Jun 15 2004, 09:07 AM
Kathy, you joined!

I'm so happy to "see" you. Welcome to the forums wavey.gif

No doubt you'll learn this stuff quicker than I will and I can go to you for help tongue.gif

Congrats on your new site and I wish you great success with it.
Offline Go to the top of the page
Reply to this topic Start new topic
3 Pages V  1 2 3 >
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
Jump to Forum:
 
Lo-Fi Version Time is now: 9th February 2010 - 06:50 PM
Meet our Moderators: cre8pc : projectphp : sanity : Black Phoenix : bwelford : EGOL : Ruud : rustybrick : AbleReach : swainzy : joedolson: eKstreme: dazzlindonna : SEOigloo: iamlost : RisaBB
Cre8asite RSS Feed