What doctype should I use ?

D

dorayme

This remark probably betrays a big misunderstanding by Beauregard
T. Shagnasty, btw. Images can be rich information and they can
get buggered up and PS is the industry standard software for
photo-retouching etc. It is an ignorant remark that its use is
merely to "make pretty". Images are an important part of modern
websites and give information, making them or even usable is not
about "prettiness".
dorayme, this "lady" ...

What use is all the know-how in the world if, in acquiring,
maintaining and disseminating it, people lose all their decency
or cause unnecessary pain to others? Jenn has not come on to hurt
anyone and if she tries your patience, perhaps it would be kinder
not to be involved. There will always be people who will try to
correct mistakes in a neutral manner, there is no need to boil
over in rage and impatience over these matters.
 
M

Mel Smith

Hi Dorayme:

I've been following these posts, and spent this morning trying to get
away from XHTML and change my page building to 4.01 strict.

So, I made a template for future pages, and finally (I thought) had a
good simple template page to build others from.

When I tried to validate it, it said I needed 'SHORTTAG YES'

So, I hunted everywhere to find out where this statement was placed on
the page (?). Everywhere I searched people were saying "Don't Use it !".
But *nobody* said where it should be placed or the syntax of this statement
if a person *did* want to use it. None of my books mentioned it either.

So, where/how should it be placed on a page ?

I have a year of using tags like <br />, etc, etc (i.e., 'shorttags')
and I wish to continue using this style. Also, I want to stay with 4.01
strict if possible.

Can you help please ?

-Mel Smith
 
A

Adrienne Boswell

Hi Dorayme:

I've been following these posts, and spent this morning trying to
get
away from XHTML and change my page building to 4.01 strict.

So, I made a template for future pages, and finally (I thought)
had a
good simple template page to build others from.

When I tried to validate it, it said I needed 'SHORTTAG YES'

So, I hunted everywhere to find out where this statement was
placed on
the page (?). Everywhere I searched people were saying "Don't Use it
!". But *nobody* said where it should be placed or the syntax of this
statement if a person *did* want to use it. None of my books
mentioned it either.

So, where/how should it be placed on a page ?

I have a year of using tags like <br />, etc, etc (i.e.,
'shorttags')
and I wish to continue using this style. Also, I want to stay with
4.01 strict if possible.

Can you help please ?

-Mel Smith

You can't use <br /> with HTML, you have to use <br>.
 
J

Jukka K. Korpela

Mel said:
I've been following these posts, and spent this morning trying to
get away from XHTML and change my page building to 4.01 strict.

Why? It's just as pointless as "moving to XHTML". Use whichever you are
accustomed to, instead of confusing yourself.
When I tried to validate it, it said I needed 'SHORTTAG YES'

Which "it" said that about which "it"? And did "it" really say the above?
No, I think "it" said "NET-enabling start-tag requires SHORTTAG YES". (Hint:
by specifying "it" by a URL, you would have avoided these nasty remarks.)
None of my books mentioned it either.

No wonder. There's only one really good book on HTML, and you probably
weren't reading it, since it's in Finnish.
So, where/how should it be placed on a page ?

Nowhere. The message is confusing, but you won't get anywhere in trying to
understand it. It suffices to know that in HTML 4.01 (Strict or not), you
must not use said:
I have a year of using tags like <br />, etc, etc (i.e.,
'shorttags') and I wish to continue using this style. Also, I want to
stay with 4.01 strict if possible.

You're asking for something logically impossible.
 
D

dorayme

"Mel Smith said:
Hi Dorayme:

I've been following these posts, and spent this morning trying to get
away from XHTML and change my page building to 4.01 strict.

So, I made a template for future pages, and finally (I thought) had a
good simple template page to build others from.

When I tried to validate it, it said I needed 'SHORTTAG YES'

So, I hunted everywhere to find out where this statement was placed on
the page (?). Everywhere I searched people were saying "Don't Use it !".
But *nobody* said where it should be placed or the syntax of this statement
if a person *did* want to use it. None of my books mentioned it either.

So, where/how should it be placed on a page ?

I have a year of using tags like <br />, etc, etc (i.e., 'shorttags')
and I wish to continue using this style. Also, I want to stay with 4.01
strict if possible.

Can you help please ?

If you are typing new mark up under the 4.01 Strict doctype, I
recommend you overcome your reluctance to abandon inserting /s in
empty elements and other XHTML practices.

<br>, not <br />. If you are converting things from pages that
use markup appropriate to XHTML pages, you can use Tidy functions
to convert, you can use a simple Find and Replace for the pages
or a F&R that will work over multiple documents.

See 3.2.1 at

<http://www.w3.org/TR/html401/intro/sgmltut.html#h-3.2.1>

"Each element type declaration generally describes three parts: a
start tag, content, and an end tag."

and

"Some HTML element types have no content. For example, the line
break element BR has no content; its only role is to terminate a
line of text. Such empty elements never have end tags."

In XHTML there is general expectation or requirement to close all
elements explicitly, hence the like of <br />

There is a note at:

<http://www.w3.org/MarkUp/1995-archive/html-spec.html>

NOTE:
The SGML declaration for HTML specifies SHORTTAG YES , which
means that there are some other valid syntaxes for tags, e.g. NET
tags: <em/.../ , empty start tags: <> , empty end tags: </> .
Until such time as support for these idioms is widely deployed,
their use is strongly discouraged.

which means basically, forgetaboutit. Or beg Korpela to explain
the practice, history, success/failure of Tag Minimization rules.
<g>

If the problem is psychological, here is a trick: When you feel
you are about to type <br />, get into the habit of thinking the
r is a cliff edge on which you are standing and the the space is
a very deep drop which you must not step into because the > is
very hard ground and will cause you serious if not fatal
injuries. Just type the > straight after the r thus bringing the
 
J

Jukka K. Korpela

Sherm said:
Wish something else - HTML 4.01 doesn't support shorttags.

It's the opposite: HTML 4.01 "supports" shorttags to the extent that a
markup system can: it has SHORTTAG YES in its SGML declaration, see
http://www.w3.org/TR/REC-html40/sgml/sgmldecl.html
The warning message issued by the W3C markup validator is thus wildly
confusing.

_Because_ HTML 4.01 formally "supports" shorttags, there is a conflict with
"self-closing" tags like <br />. In XHTML, <br /> means
<br></br>
In HTML 4.01, <br /> means
<br>>
It can't be both, so throwing <br /> into an HTML 4.01 document is wrong,
even thout it does not cause harm in browsers (since browsers do not
actually support HTML 4.01, or any HTML specification for that matter: among
other things, they don't implement shorttag handling). It often confuses
validators, and validators are our friends, despite their oddities.

This is explained in detail in
http://www.cs.tut.fi/~jkorpela/html/empty.html

Confused? Then just remember this: HTML 4.01 and XHTML shall not be mixed.
 
M

Mel Smith

Hi Adrienne, Jukka, Dorayme, & Sherm:

Thank y'all for the explanations.

I guess I'll have to 'unlearn' the usage of <br /> (etc) :(

-Mel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top