These forums are currently read-only due to receiving more spam than actual discussion. Sorry.

It is currently Sat Dec 02, 2017 4:06 pm Advanced search

HTML4 Transitional and HTML5

Do you think the HTML spec should do something differently? You can discuss spec feedback here, but you should send it to the WHATWG mailing list or file a bug in the W3C bugzilla for it to be considered.

HTML4 Transitional and HTML5

Postby fprog » Sat Jul 21, 2007 2:54 am

Few things:

First, can you ensure that this is valid HTML5:

http://kb.adobe.com/selfservice/viewCon ... &sliceId=2

I hate doing stupid things like validating a page with:

http://www.example.com/page.html?flash=no

Because this is "INVALID":

<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
WIDTH="550" HEIGHT="400" id="myMovieName"><PARAM NAME=movie VALUE="myFlashMovie.swf"><PARAM NAME=quality VALUE=high><PARAM NAME=bgcolor VALUE=#FFFFFF><EMBED src="/support/flash/ts/documents/myFlashMovie.swf" quality=high bgcolor=#FFFFFF WIDTH="550" HEIGHT="400"
NAME="myMovieName" ALIGN="" TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED></OBJECT>

Furthermore, do NOT deprecate any HTML3 or HTML4 tags,
make them "OPTIONAL" or "undesired".

Removing features and common work-around is a VERY BAD THING to do,
it makes ppl sad, angry and depressing, with billions of web pages
using features that you downgrade that's terrible.

You can "suggest" or make:

HTML5 simple (which is strict and removes such undesirable legacy,
for small devices)

If this makes no sense to you then create this:

HTML5 transitional (what everyone will do)
HTML5 strict (what you should do)
HTML5 custom (transitional with my own tags valid)

meaning that a page with "optional" tags and <object/embed> trick
parse as VALID HTML5, thank you very much.

Also, what do we do about non-namespaced user tags?

<MyTag><MyData></MyData></MyTag>

Should we have a:

HTML5 transitional, custom, loose, weak allow this?

Think about someone going HTML6 in the future,
but want old browsers to fallback to HTML5 and ignore "new tags"...

Comments, feedback, more than well-come =)
fprog
<h5>
 
Posts: 11
Joined: Tue Jun 05, 2007 12:41 am

Just another note...

Postby fprog » Sat Jul 21, 2007 3:06 am

I also dislike the facts that HTML3, HTML4 and XHTML1 does not mix.

You cannot have namespace in HTML4 transitional,
you cannot have some tags/attributes in XHTML1
you cannot have some legacy tags in HTML4...

This is nuts, even though that "web page" parse PERFECTLY
on Mozilla, IE, Safari, KHTML and Opera...

Go figure!
fprog
<h5>
 
Posts: 11
Joined: Tue Jun 05, 2007 12:41 am

Postby wgabrie » Fri Jul 27, 2007 10:31 pm

The object tag could be fixed if all of its attributes were inside quotation marks (" "). The closing </embed> tag will always show up as invalid in html 3-4 validators. Inside the <embed> tag, the "quality=high" attribute is not part of any html spec and is only used to set up the Flash player.

A better tool for custom tags is xml.

HTML 5 is expanded from the HTML 4.01/XHTML 1.0 strict spec. It isn't transitional so you can't use some of the HTML 3.2 attributs such as: <p align="right">.

Don't be so sure that legacy tags are the best way to go. It is only a matter of time before browser support for legacy tags withers. When I upgraded to Opera version 9.21, this HTML 3 embed tag no longer looped a sound clip:

<EMBED SRC="../midimusic/grandfather.mid" width=0 height=5 loop=true autostart=true>

(Taken from the Contemplator's Folk music site.)
wgabrie
<h4>
 
Posts: 25
Joined: Thu Apr 05, 2007 8:55 pm

Postby zcorpan » Sat Jul 28, 2007 12:34 am

wgabrie wrote:The object tag could be fixed if all of its attributes were inside quotation marks (" ").
Why would that make a difference?
wgabrie wrote:The closing </embed> tag will always show up as invalid in html 3-4 validators.
The start tag too.
wgabrie wrote:Inside the <embed> tag, the "quality=high" attribute is not part of any html spec and is only used to set up the Flash player.
HTML5 allows any attribute in no namespace to be declared on <embed>.

wgabrie wrote:A better tool for custom tags is xml.
Why?

wgabrie wrote:HTML 5 is expanded from the HTML 4.01/XHTML 1.0 strict spec.
Actually, as I understand it, HTML5 started from a clean slate and then added features based on use-cases, and what is already implemented in UAs, rather than starting with looking at what is present in HTML4 strict.
wgabrie wrote:It isn't transitional so you can't use some of the HTML 3.2 attributs such as: <p align="right">.

Don't be so sure that legacy tags are the best way to go. It is only a matter of time before browser support for legacy tags withers.
I don't expect browsers to drop support for legacy tags at all.
wgabrie wrote:When I upgraded to Opera version 9.21, this HTML 3 embed tag no longer looped a sound clip:

<EMBED SRC="../midimusic/grandfather.mid" width=0 height=5 loop=true autostart=true>

(Taken from the Contemplator's Folk music site.)
Works for me. <embed> is not part of HTML3.
zcorpan
<article>
 
Posts: 807
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden

Postby wgabrie » Mon Jul 30, 2007 2:59 am

Why would that make a difference?

The object tag will validate as proper HMTL code if all the attributes are inside "", If that was the concern in post #1.

The only reason to leave attributes open is as a hack to fix an early Internet Explorer version (3 or something) that ignored enclosed attributes.

Althogh I haven't been testing the idea, an attribute may confuse a web browser if its open property contains spaces.


Why [use xml for cutom tags]?

Thank you for reminding me. HTML does allow the creation of any tag. But for a tag to do something special up to three things must happen:

1) The tag was already recognised by the web browser or associated plug-in.

2) Making a custom DTD, a doctype with a tag list, or an XML namespace.

3) Use stylesheets to change the tag's appearance.

Was there something else?


Browsers may always have a quirks mode, but, as I understand this creates problems such as loosing fine control over layout with stylesheets.


I'd like to clearify that when I refer to embed as an HTML 3 tag, I refer to the lack of enclosed tag attributes. -- A cronic problem of the HTML 3 era thanks to early Internet Explorer versions.
wgabrie
<h4>
 
Posts: 25
Joined: Thu Apr 05, 2007 8:55 pm

Postby zcorpan » Tue Jul 31, 2007 3:13 pm

wgabrie wrote:The object tag will validate as proper HMTL code if all the attributes are inside "", If that was the concern in post #1.
It wouldn't. The "" are optional in HTML. It doesn't validate as HTML4 because of the <embed> tag -- not because of the lack of "" around attribute values.

wgabrie wrote:The only reason to leave attributes open is as a hack to fix an early Internet Explorer version (3 or something) that ignored enclosed attributes.

Althogh I haven't been testing the idea, an attribute may confuse a web browser if its open property contains spaces.


Why [use xml for cutom tags]?

Thank you for reminding me. HTML does allow the creation of any tag. But for a tag to do something special up to three things must happen:

1) The tag was already recognised by the web browser or associated plug-in.

2) Making a custom DTD, a doctype with a tag list, or an XML namespace.

3) Use stylesheets to change the tag's appearance.

Was there something else?


Browsers may always have a quirks mode, but, as I understand this creates problems such as loosing fine control over layout with stylesheets.


I'd like to clearify that when I refer to embed as an HTML 3 tag, I refer to the lack of enclosed tag attributes. -- A cronic problem of the HTML 3 era thanks to early Internet Explorer versions.

I don't follow what you're talking about here...
zcorpan
<article>
 
Posts: 807
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden

Some more comment.

Postby fprog » Wed Aug 08, 2007 4:34 am

Ok, just to make it clearer.

Quotes are not necessary in HTML.
Second, this FLASH method is used EVERYWHERE,
by everyone, so why not making it STANDARD for god sake.

You could also rewrite this as follow:

<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
WIDTH="550" HEIGHT="400" id="myMovieName"><PARAM NAME=movie VALUE="myFlashMovie.swf" /><PARAM NAME="quality" VALUE="high" /><PARAM NAME="bgcolor" VALUE="#FFFFFF" /><EMBED src="/support/flash/ts/documents/myFlashMovie.swf" quality="high" bgcolor="#FFFFFF" WIDTH="550" HEIGHT="400"
NAME="myMovieName" ALIGN="" TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"/></OBJECT>

The only thing is the first "version" was what the web editor created automagically.

There's NO REASON to deprecate

<p align="right">

or <p><p> (not closed)

There's also no reason why web browser would remove old tag...
it makes there product worst, not better, people still use these.

I was specifying transitional, for everything that includes
"undesired legacy". i.e.: Things that simple embedded web browser
like "iBrowse" and similar would not have to support by default.
fprog
<h5>
 
Posts: 11
Joined: Tue Jun 05, 2007 12:41 am

Some more comments

Postby mskinner » Fri Aug 10, 2007 12:31 pm

fprog wrote:Quotes are not necessary in HTML.

Incorrect. Always use quotes around element attributes - whether you plan to move to XHTML or not.

Take for example the (highly recommended for DDA/508) specification of ALT attributes to images and TITLE attributes to labels/form fields, etc. Without using quotes, a sentence of several words is harder/slower for a browser to identify:

Code: Select all
<img scr=city_bridge.png alt=Photograph of the city bridge at sunset in July 2007 border=0 />


Now look at the same with quotes:

Code: Select all
<img scr="city_bridge.png" alt="Photograph of the city bridge at sunset in July 2007" border="0" />


fprog wrote:There's NO REASON to deprecate
<p align="right">
or <p><p> (not closed)

The first paragraph doesn't separate presentation from content (it is better to accomplish the same using a CSS class). The repeated paragraphs can be achieved using CSS margins or line breaks (<br />).

fprog wrote:There's also no reason why web browser would remove old tag...
it makes there product worst, not better, people still use these.

New standards/recommendations are designed to address flaws in previous recommendations, give developers a better toolbox, more maintainable code moving forward and the user a richer experience (eg WF2).
mskinner
<h2>
 
Posts: 116
Joined: Sun Jun 24, 2007 12:20 am
Location: Melbourne, Australia

Re: Some more comments

Postby zcorpan » Fri Aug 10, 2007 1:52 pm

mskinner wrote:
fprog wrote:Quotes are not necessary in HTML.

Incorrect.
No.
mskinner wrote:Without using quotes, a sentence of several words is harder/slower for a browser to identify:

Code: Select all
<img scr=city_bridge.png alt=Photograph of the city bridge at sunset in July 2007 border=0 />
It is not harder or slower, but it means something different. The above is equivalent to:
Code: Select all
<img scr="city_bridge.png" alt="Photograph" of="" the="" city="" bridge="" at="" sunset="" in="" july="" 2007="" border="0">
zcorpan
<article>
 
Posts: 807
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden

CSS and attributes

Postby fprog » Fri Aug 10, 2007 5:53 pm

There's NO REASON to deprecate
<p align="right">
or <p><p> (not closed)


The first paragraph doesn't separate presentation from content (it is better to accomplish the same using a CSS class). The repeated paragraphs can be achieved using CSS margins or line breaks (<br />).


So, what? It's legal and it should remain as such, this kind of non-sense deprecation means that YOU WANT to break existing web application, billions of web page, because you don't like the old tag.

It also means that a legacy page or generated content cannot be inserted into a HTML5 page safely.

Furthermore, maybe just maybe, I want to support old browsers that are not yet HTML5, while enhancing the display for HTML5 content?

That was the goal behind some new tags

You don't write this:
Code: Select all
<img src=city_bridge.png alt=Photograph of the city bridge at sunset in July 2007 border=0 />


Nobody ever wrote that, but this is PERFECTLY legal:

Code: Select all
<img src=city_bridge.png alt='Photograph of the city bridge at sunset in July 2007' border=0 />


I agree with you that putting quotes is a good thing,
but if you are http://www.google.com/
and let say you want to save few gigabytes of networking traffic...
by simply removing extra quotes, spaces, compress your identifier
and scripts to bare minimum.

You may want to write your welcome page like this, so it shows up in a blink of eye, notice the lack of quotes in some tags:
Code: Select all
<html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>Google</title><style>...</style>
<script>...</script>
</head><body bgcolor=#ffffff text=#000000 link=#0000cc vlink=#551a8b alink=#ff0000 onload="sf();if(document.images){new Image().src='/images/nav_logo3.png'}" topmargin=3 marginheight=3><div align=right id=guser style="font-size:84%;padding:0 0 4px" width=100%>
....
<table cellpadding=0 cellspacing=0><tr valign=top><td width=25%>&nbsp;</td><td align=center nowrap><input name=hl type=hidden value=en><input maxlength=2048 name=q size=55 title="Google Search" value=""><br><input name=btnG type=submit value="Google Search"><input name=btnI type=submit value="I'm Feeling Lucky"></td><td nowrap width=25%><font size=-2>&nbsp;&nbsp;<a href=/advanced_search?hl=en>Advanced Search</a><br>&nbsp;&nbsp;<a href=/preferences?hl=en>Preferences</a><br>&nbsp;&nbsp;<a href=/language_tools?hl=en>Language Tools</a></font></td></tr><tr><td align=center colspan=3><font size=-1>Search: <input id=all type=radio name=meta value="" checked><label for=all> the web </label>....</body></html>


Let me add that writing a parser that support quotes or not for attribute is a trivial FSM.
fprog
<h5>
 
Posts: 11
Joined: Tue Jun 05, 2007 12:41 am

Re: Some more comments

Postby mskinner » Sat Aug 11, 2007 2:29 am

zcorpan wrote:
mskinner wrote:
fprog wrote:Quotes are not necessary in HTML.

Incorrect.

No.

My example demonstrates a valid reason why attributes should be quoted. HTML 4.01 requires quoted attributes http://www.w3.org/TR/html401/intro/sgmltut.html so your "No" is neither accurate or helpful.

zcorpan wrote:
mskinner wrote:Without using quotes, a sentence of several words is harder/slower for a browser to identify:
Code: Select all
<img scr=city_bridge.png alt=Photograph of the city bridge at sunset in July 2007 border=0 />

It is not harder or slower, but it means something different. The above is equivalent to:
Code: Select all
<img scr="city_bridge.png" alt="Photograph" of="" the="" city="" bridge="" at="" sunset="" in="" july="" 2007="" border="0">


Incorrect. I don't know how many HTML parsers you have written (I wrote my first back in 1997 in a language called Miranda) - but it is MUCH faster to read a quoted attribute - and it can be done in less code. To state otherwise demonstrates a lack of understanding of the way programming languages are used to search/manipulate strings.

fprog wrote:
There's NO REASON to deprecate
<p align="right">
or <p><p> (not closed)


The first paragraph doesn't separate presentation from content (it is better to accomplish the same using a CSS class). The repeated paragraphs can be achieved using CSS margins or line breaks (<br />).


So, what? It's legal and it should remain as such, this kind of non-sense deprecation means that YOU WANT to break existing web application, billions of web page, because you don't like the old tag.

Nobody is going to force developers to migrate to HTML5. The SGML formatting requirements have been part of HTML 4.01 and XHTML since 1999 - so it's not like professional web developers are not aware of it.

fprog wrote:It also means that a legacy page or generated content cannot be inserted into a HTML5 page safely.

Some IDEs can refactor legacy markup according to the the doctype at the top of the file.

fprog wrote:Furthermore, maybe just maybe, I want to support old browsers that are not yet HTML5, while enhancing the display for HTML5 content?

I'm sorry, but even legacy browsers support quoted attributes and closed elements. There is no excuse for such laziness.

fprog wrote:That was the goal behind some new tags

No, it was to add elements needed by developers to make markup more semantic (article, section, etc) and to make it easier to do other things that currently require a lot of code (eg: <input type="date />).

fprog wrote:Nobody ever wrote that, but this is PERFECTLY legal:
Code: Select all
<img src=city_bridge.png alt='Photograph of the city bridge at sunset in July 2007' border=0 />

It is also PERFECTLY inconsistent.

fprog wrote:I agree with you that putting quotes is a good thing,
but if you are http://www.google.com/
and let say you want to save few gigabytes of networking traffic...
by simply removing extra quotes, spaces, compress your identifier
and scripts to bare minimum.

You may want to write your welcome page like this, so it shows up in a blink of eye, notice the lack of quotes in some tag

Adding 20 extra double quote characters to a page will not make any web client load the page slower. 20 bytes does not make a difference, even to those on dialup modems. With HTTP compression, it's even less.

You are correct, more quoted attributes will amount to more bandwidth usage for the sites that experience traffic like Google does.
mskinner
<h2>
 
Posts: 116
Joined: Sun Jun 24, 2007 12:20 am
Location: Melbourne, Australia

Re: Some more comments

Postby zcorpan » Sat Aug 11, 2007 3:12 pm

mskinner wrote:My example demonstrates a valid reason why attributes should be quoted.
Yes, and it might well be less error prone to always quote your attributes, but it doesn't mean that they are necessary (as in required by the spec).
mskinner wrote:HTML 4.01 requires quoted attributes http://www.w3.org/TR/html401/intro/sgmltut.html so your "No" is neither accurate or helpful.
HTML4 does not require quoted attributes.
HTML4 wrote:In certain cases, authors may specify the value of an attribute without any quotation marks.
-- http://www.w3.org/TR/html401/intro/sgmltut.html#h-3.2.2
zcorpan
<article>
 
Posts: 807
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden


Return to Feedback on the Specs

Who is online

Users browsing this forum: No registered users and 1 guest