Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > What doctype should I use ?

Reply
Thread Tools

What doctype should I use ?

 
 
dorayme
Guest
Posts: n/a
 
      05-13-2010
In article <7SSGn.24541$(E-Mail Removed)>,
"rf" <(E-Mail Removed)> wrote:

> dorayme wrote:
> > In article <hsfdvf$qvh$(E-Mail Removed)-september.org>,
> > "Beauregard T. Shagnasty" <(E-Mail Removed)> wrote:
> >
> >> Jenn wrote:
> >>
> >>> Beauregard T. Shagnasty wrote:
> >>>> Jenn wrote:
> >>>>> I like Photoshop for graphics design.. and Bryce 3d just for fun.
> >>>>
> >>>> Photoshop is fine for "make pretty." ...


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

> >>>
> >>> Adobe photoshop is an industry standard program, along with Flash,
> >>> and similar other programs.
> >>
> >> .. like The GIMP.
> >>
> >> <snipproof>
> >> But you still don't know what a DOCTYPE is.
> >> </snipproof>

> >
> > And you, for no discernible useful reason, continue to hassle
> > this lady with schoolyard bully taunts.

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

--
dorayme
 
Reply With Quote
 
 
 
 
Mel Smith
Guest
Posts: n/a
 
      05-15-2010
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


 
Reply With Quote
 
 
 
 
Adrienne Boswell
Guest
Posts: n/a
 
      05-15-2010
Gazing into my crystal ball I observed "Mel Smith"
<(E-Mail Removed)> writing in
news:(E-Mail Removed):

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

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      05-15-2010
Mel Smith wrote:

> 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 <br /> but just <br>.

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

--
Yucca, http://www.cs.tut.fi/~jkorpela/

 
Reply With Quote
 
dorayme
Guest
Posts: n/a
 
      05-15-2010
In article <(E-Mail Removed)>,
"Mel Smith" <(E-Mail Removed)> wrote:

> 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
> ground up to where the r is and making it safe again.


--
dorayme
 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      05-15-2010
Sherm Pendley wrote:

>> I have a year of using tags like <br />, etc, etc (i.e., 'shorttags')
>> and I wish to continue using this style.

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

--
Yucca, http://www.cs.tut.fi/~jkorpela/

 
Reply With Quote
 
Mel Smith
Guest
Posts: n/a
 
      05-15-2010
Hi Adrienne, Jukka, Dorayme, & Sherm:

Thank y'all for the explanations.

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

-Mel


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS Newbie - CSS Works With Invalid DOCTYPE. Fails With Valid DOCTYPE. Larry Lindstrom HTML 19 06-12-2012 02:07 PM
Object html page embeds allow use of any Doctype codes as inserts cwdjrxyz HTML 1 01-28-2011 09:01 AM
libxml: is it possible not to use doctype declaration? ruud grosmann Ruby 15 08-02-2008 05:38 PM
Which doctype do I use? Jim Scott HTML 5 09-10-2005 07:50 PM
which doctype to use?? and one other bbxrider Javascript 1 08-09-2003 08:38 PM



Advertisments