Hey Marcos,

On Fri, 05 Mar 2010 12:33:58 +0100, Marcos Caceres <[email protected]> wrote:
General comment:
I'm confused as to the intended audience of this document. This
document is heavy on HTML5 jargon which would make it difficult for an
author to use without having to refer to the HTML spec itself. If this
document is intended for authors, then my opinion is that it needs a
lot of clarifications (which I've asked for below). If its intended
for implementers, I really don't see the point of this document.

It's intended for authors. It's not intended to be the definitive reference, but just a quick overview of things.


I've reviewed this document with my "author" and "generally interested
in this stuff" hat on. I have been using HTML for 15 years now, so I
use that as my knowledge base.  I would like to see each of the
questions below answered in the document (i.e, I don't care for
responses to questions in this email, just an acknowledgment that the
things have been clarified in the document - but if you want to
include the new text that you add as part of the response, that's ok
with me)...

Reading your comments I think you may actually be interested in a difference effort:

  http://wiki.whatwg.org/wiki/Rationale


On Fri, Mar 5, 2010 at 9:16 AM, Marcos Caceres <[email protected]> wrote:
1. Introduction

HTML has been in continuous evolution since it was introduced to the
Internet in the early 1990s.

Reference to the first draft of HTML would be nice here.

I don't think that's needed. If people are interested they can look it up.


Some features were introduced in
specifications; others were introduced in software releases.

Like which? and why?

I don't think that's of relevance to this document.


In some
respects, implementations and author practices have converged with
each other and with specifications and standards, but in other ways,
they continue to diverge.

The above is weak on it's own (it reads like a personal observation).
Can you expand on it and give concrete examples.

I don't think that's of relevance to this document. It's really just an introduction, not a definitive reference.


HTML4 became a W3C Recommendation in 1997. While it continues to serve
as a rough guide to many of the core features of HTML, it does not
provide enough information to build implementations that interoperate
with each other and, more importantly, with a critical mass of
deployed content.

This may be generally accepted by some members of the community, yet
it does not let outsiders know what what actually wrong with the way
HTML4 was specified. This is really important, because it underpins
why HTML5 is such a large spec and why it covers so much stuff. Can
you please clearly list the deficiencies which HTML4 has and how HTML5
has attempted to overcome those (i.e., what processes are actually in
place to avoid the mistakes of HTML4 being remade in HTML5).

I don't think that's of relevance to this document, but it would certainly be interesting to have such a document. The audience of such a document would not be authors though, I would think.


The same goes for XHTML1, which defines an XML
serialization for HTML4, and DOM Level 2 HTML, which defines
JavaScript APIs for both HTML and XHTML. HTML5 will replace these
documents. [DOM2HTML] [HTML4] [XHTML1]

What does it mean that HTML5 will replace these documents? Will those
documents all be marked as obselete? Will an authors be discouraged
from using HTML < 5?

Yes, though since there are still some ongoing debates I think it is better to leave it vague. No need to predict the future.


The HTML5 draft reflects an effort, started in 2004, to study
contemporary HTML implementations and deployed content.

Where is this study published? What methodology was used to gather the
results and draw conclusions? Where is the data available?

To study something does not mean something was published:

  http://www.answers.com/study

But you can find data scattered throughout the web. I'm sure if you ask on #whatwg on Freenode people can provide you pointers.


The draft:

Which draft?

HTML5 of course.


  1. Defines a single language called HTML5 which can be written in
HTML syntax and in XML syntax.
  2. Defines detailed processing models to foster interoperable
implementations.

" to foster" > "that aims to foster"

I don't think this is needed.


  3. Improves markup for documents.

In what way? point 3 seems out of context with the rest of the points
listed here.

Syntax (1), processing models (2), language for documents (3), and APIs for applications (4) does not seem out of context to me. They roughly represent the goals.


4. Introduces markup and APIs for emerging idioms, such as Web applications.


1.1. Open Issues

HTML5 is still a draft. The contents of HTML5, as well as the contents
of this document which depend on HTML5, are still being discussed on
the HTML Working Group and WHATWG mailing lists. The open issues
include (this list is not exhaustive):

* De facto semantic definitions for some formerly presentational elements.

Why is this an open issue? Either describe it, or link to something
that describes it.

   * Details of accessibility and media-independence features, such
as the alt and summary attributes.

Why is this an open issue? Either describe it, or link to something
that describes it.

It's just a summary that not all is settled yet. If authors care about the details they can join the HTML WG.


1.2. Backwards Compatible

HTML5 is defined in a way that it is backwards compatible with the way
user agents handle deployed content.

How does it achieve this?

I don't think that's relevant for authors. They just need to know that it is.


To keep the authoring language
relatively simple for authors several elements and attributes are not
included as outlined in the other sections of this document, such as
presentational elements that are better dealt with using CSS.

User agents, however, will always have to support these older elements
and attributes and this is why the specification clearly separates
requirements for authors and user agents.

s/this specification/the HTML5 specification/

It does not say "this".


This means that authors
cannot use the isindex or the plaintext element, but user agents are
required to support them in a way that is compatible with how these
elements need to behave for compatibility with deployed content.

The above is just an example of various possible strange elements, right?

Right.


Since HTML5 has separate conformance requirements for authors and user
agents there is no longer a need for marking features "deprecated".

Why is that, how does that work? (Although the document is nicely
written, your writing consistently assumes that the reader will be
able to deduce why a decision was taken - when you do this, and the
reader (me) cannot understand why a decision was made, it makes them
feel stupid. Please explain "clever" decisions like the author
requirements... for instance, authoring requirements make no sense as
authors are not products that can conform to the specification. I'm
sure there is a very clever answer to this, so I hope to read it in
the next draft! )

I don't follow this. How can authors not conform to requirements?


1.3. Development Model

The HTML5 specification will not be considered finished before there
are at least two complete implementations of the specification.

What does this mean in practice? How will completeness be shown?

Clarified.


This
is a different approach than previous versions of HTML had.

Change to:
This approach differs from previous versions of HTML.

Changed.


 The goal
is to ensure that the specification is implementable and usable by
designers and developers once it is finished.

How is that "assured" by the working group? What measure/means will be
used to see if the WG has met its goal.  Also, it sounds like you are
saying "implementable...by designers" which I'm not sure is what you
mean.

Also, I think it's better to use the more generic term author, instead
of "designers and developers" (this distinction is subject to a lot of
controversy, no need to remind the reader of it:)).

Changed to authors.


1.4. Impact on Web Architecture

The following areas / features defined in HTML5 are believed to impact
the Web architecture:

What is the "Web architecture" in this context? And what do you mean
by "impact"? does it change it in some fundamental way?

I removed this section.


2. Syntax

HTML5 defines an HTML syntax that is compatible with HTML4 and XHTML1
documents published on the Web, but is not compatible with the more
esoteric SGML features of HTML4, such as processing instructions and
shorthand markup.

Why is it not compatible?

Clarified.


Documents using the HTML syntax are almost always
served with the text/html media type.

HTML5 also defines detailed parsing rules (including "error handling")

I would drop "detailed", though the may be "detailed", that is a
matter of opinion.

I think it reads better with it in (also an opinion, I know :-)).


for this syntax which are largely compatible with popular
implementations.

Please reference the implementations on which the parsing is based.
And please explain why those implementations (be it browser or search
engine) were chosen as the basis on which the parsing algorithm was
based on.

I don't think this is of relevance to this document, but it would sure be interesting.


 User agents must use these rules for resources that
have the text/html media type. Here is an example document that
conforms to the HTML syntax:

I'm not sure why this example is here? What does this have to do with
parsing? How is the parsing of this document any different from HTML4?

It illustrates what was just explained. The DOCTYPE is different. <meta charset> is too.


<!doctype html>
<html>
 <head>
   <meta charset="UTF-8">
   <title>Example document</title>
 </head>
 <body>
   <p>Example paragraph</p>
 </body>
</html>

HTML5 also defines a text/html-sandboxed media type for documents
using the HTML syntax. This can be used when hosting untrusted
content.

Be nice to say that HTML < 5 did not have this. What's untrusted
content? Can you go into some details about the usage or reason why
this is useful (e.g., how it affects scripting capabilities)?

This document is not intended for such depth.


The other syntax that can be used for HTML5 is XML. This syntax is
compatible with XHTML1 documents and implementations. Documents using
this syntax need to be served with an XML media type

You should reference the XML or XHTML media type spec. Or link to it.

HTML5 defines the XHTML media type and is referenced.


and elements need
to be put in the http://www.w3.org/1999/xhtml namespace following the
rules set forth by the XML specifications. [XML]

This seems redundant, given that it's all part of xhtml.

But usually it's not immediately clear in my experience.


Below is an example document that conforms to the XML syntax of HTML5.
Note that XML documents must have an XML media type such as

s/must have/must be served with ?

Sure.


application/xhtml+xml or application/xml.

<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml";>
 <head>
   <title>Example document</title>
 </head>
 <body>
   <p>Example paragraph</p>
 </body>
</html>

2.1. Character Encoding

For the HTML syntax of HTML5

need a comma here (otherwise it reads like "HTML5-authors")

Added.


authors have three means of setting the
character encoding:

   * At the transport level. By using the HTTP Content-Type header
for instance.
   * Using a Unicode Byte Order Mark (BOM) character at the start of
the file. This character provides a signature for the encoding used.
   * Using a meta element with a charset attribute that specifies the
encoding within the first 512 bytes of the document. E.g. <meta
charset="UTF-8"> could be used to specify the UTF-8 encoding. This
replaces the need for <meta http-equiv="Content-Type"
content="text/html; charset=UTF-8"> although that syntax is still
allowed.

How is this different from HTML4?

<meta charset> was not in HTML4.


For the XML syntax, authors have to use the rules as set forth in the
XML specifications to set the character encoding.

How is this any different from XHTML?

It isn't.


Seem that this whole section is explaining features, not differences.

It seemed appropriate to have a section on syntax.


2.2. The DOCTYPE

The HTML syntax of HTML5 requires a DOCTYPE to be specified to ensure
that the browser renders the page in standards mode.

What is this "standards mode"?

Most authors reading this document will already be familiar with the term.


The DOCTYPE has
no other purpose and is therefore optional for XML. Documents with an
XML media type are always handled in standards mode. [DOCTYPE]

The DOCTYPE declaration is <!DOCTYPE html> and is case-insensitive in
the HTML syntax. DOCTYPEs from earlier versions of HTML were longer
because the HTML language was SGML-based and therefore required a
reference to a DTD.

What did this longer DOCTYPE look like, so we can see the differences
from HTML4?

It is assumed you already know HTML4.


With HTML5 this is no longer the case and the see
DOCTYPE is only needed to enable standards mode for documents written
using the HTML syntax. Browsers already do this for <!DOCTYPE html>.

So, basically, it's required to identify a document as HTML5? This is
unclear because the whole standards mode thing is undefined. You need
to expand this section to show how it actually works and explain that
an old doc type will still trigger HTML5 features if available
(presumably).

Since that is non-conforming I don't think it's relevant for authors.


2.3. MathML and SVG

You should start with "Unlike HTML4," or something...

Why, it already says "of HTML5".


The HTML syntax of HTML5 allows for MathML and SVG elements to be used
inside a document. E.g. a very simple document using some of the
minimal syntax features could look like:

<!doctype html>
<title>SVG in text/html</title>
<p>
 A green circle:
 <svg> <circle r="50" cx="50" cy="50" fill="green"/> </svg>
</p>

More complex combinations are also possible. E.g. with the SVG
foreignObject element you could nest MathML, HTML, or both inside an
SVG fragment that is itself inside HTML.

Fancy.

2.4. Miscellaneous

There are a few other syntax changes worthy of mentioning:

   * HTML now has native support for IRIs, though they can only be
fully used if the document encoding is UTF-8 or UTF-16.
   * The lang attribute takes the empty string in addition to a valid
language identifier, just like xml:lang does in XML.

So what? What does that mean in terms of difference with HTML4 in
terms of behavior?

That you can do more? I don't get your comment.


3. Language

This section is split up in several subsections to more clearly
illustrate the various differences there are between HTML4 and HTML5.
3.1. New Elements

The links in this section may stop working if elements are renamed
and/or removed. They should function in the latest version of this
draft.

The following elements have been introduced for better structure:

   *

     section represents a generic document or application section. It
can be used together with the h1, h2, h3, h4, h5, and h6 elements to
indicate the document structure.

On what grounds was the addition of the section element made? what was
lacking in HTML4?

That seems like something for this document:

  http://wiki.whatwg.org/wiki/Rationale

Since you are asking the same question for all new elements I have omitted those questions from my reply.



     mark represents a run of marked text.

What's "marked text"?

Clarified.


<snip/>

3.2. New Attributes

HTML5 has introduced several new attributes to various elements that
were already part of HTML4:

   *

     The a and area elements now have a media attribute for
consistency with the link element. It is purely advisory.

What does "purely advisory" mean?

Elided.


   *

     The a and area elements have a new attribute called ping that
specifies a space-separated list of URLs which have to be pinged when
the hyperlink is followed. Currently user tracking is mostly done
through redirects. This attribute allows the user agent to inform
users which URLs are going to be pinged as well as giving
privacy-conscious users a way to turn it off.
   *

     The area element, for consistency with the a and link elements,
now also has the hreflang and rel attributes.

What does it do?

See HTML4 (well, or HTML5 if you're not familiar with HTML4).


   *

     The base element can now have a target attribute as well, mainly
for consistency with the a element. (This is already widely
supported.)

s/a element. (T/a element (t

And put the stop outside the ")".

Really? It is a separate sentence.


Also, the target attribute for the a and area elements is
no longer deprecated, as it is useful in Web applications, e.g. in
conjunction with iframe.
   *

     The value attribute for the li element is no longer deprecated
as it is not presentational. The same goes for the start attribute of
the ol element.
   *

     The meta element has a charset attribute now as this was already
widely supported and provides a nice way to specify the character
encoding for the document.

nice way? you mean more compact?

I don't think changing this would improve the quality of the document.


   *

     A new autofocus attribute can be specified on the input (except
when the type attribute is hidden), select, textarea and button
elements. It provides a declarative way to focus a form control during
page load. Using this feature should enhance the user experience as
the user can turn it off if he does not like it, for instance.

s/he/they/; please be gender neutral.

Fixed.


   *

     A new placeholder attribute can be specified on the input and
textarea elements.
   *

What does it do?

Clarified.



     The new form attribute for input, output, select, textarea,
button and fieldset elements allows for controls to be associated with
a form. I.e. these elements can now be placed anywhere on a page, not
just as descendants of the form element.

The above is confusing - I had to read it a few times to get it. Maybe
include an example.

Done.


   *

     The new required attribute applies to input (except when the
type attribute is hidden, image or some button type such as submit)
and textarea. It indicates that the user has to fill in a value in
order to submit the form.

What's the purpose? Does it block the user from submitting?

There are too much scenarios here to explain that concisely. It already explains its general purpose, if people want to use it they can easily find out more.


   *

     The fieldset element now allows the disabled attribute disabling
all its contents when specified.

What does it mean "disabling all its content"? Maybe this should say
something about being able to interface with the element?

I think it is fine as is.


   *

     The input element has several new attributes to specify
constraints: autocomplete, min, max, multiple, pattern and step. As
mentioned before it also has a new list attribute which can be used
together with the datalist element.

Why were these added?

That is something for this document to answer:

  http://wiki.whatwg.org/wiki/Rationale


   *

     The form element has a novalidate attribute that can be used to
disable form validation submission (i.e. the form can always be
submitted).

What does this do? is this a script thing?

See my comment on the required attribute.


   *

     The input and button elements have formaction, formenctype,
formmethod, formnovalidate, and formtarget as new attributes. If
present, they override the action, enctype, method, novalidate, and
target attributes on the form element.

Why is this significant?

It is a difference from HTML4.


   *

     The menu element has two new attributes: type and label. They
allow the element to transform into a menu as found in typical user
interfaces as well as providing for context menus in conjunction with
the global contextmenu attribute.

Why is this significant? You should probably talk a little about the
contextmenu attribute, as you have not yet discussed it in the
document. At least say you talk about it later.

If people are interested in this feature they will find out more about it. This document is just a summary.


   *

     The style element has a new scoped attribute which can be used
to enable scoped style sheets. Style rules within such a style element
only apply to the local tree.

What's a "scoped style sheet"?

That is explained in the next sentence.


   *

     The script element has a new attribute called async that
influences script loading and execution.

How does it influence it? what for?

Again, this document is just summary.


   *

     The html element has a new attribute called manifest that points
to an application cache manifest used in conjunction with the API for
offline Web applications.

What's an "application cache manifest"?

See above.


   *

     The link element has a new attribute called sizes. It can be
used in conjunction with the icon relationship (set through the rel
attribute) to indicate the size of the referenced icon.

What? icons in HTML? what's are these "icons"?

Favicons have been age-old.


   *

     The ol element has a new attribute called reversed to indicate
that the list order is descending when present.

s/present/presented ?

No.


   *

     The iframe element has three new attributes called sandbox,
seamless, and srcdoc which allow for sandboxing content, e.g. blog
comments.

What does this do?

It's just a summary.


Several attributes from HTML4 now apply to all elements. These are
called global attributes: class, dir, id, lang, style, tabindex and
title.

There are also several new global attributes:

<snip>

HTML5 also makes all event handler attributes from HTML4 that take the
form onevent-name

s/that take the form onevent-name global/, which take the form onevent-name,

Fixed.


global attributes and adds several new event handler
attributes for new events it defines,

Break the sentence here. It's too long.

Done.


such as the play event which is
used by the API for the media elements, video and audio.
3.3. Changed Elements

These elements have slightly modified meanings in HTML5 to better
reflect how they are used on the Web or to make them more useful:

   *

     The a element without an href attribute now represents a
"placeholder link". It can also contain flow content rather than being
restricted to phrase content.

What's a "placeholder link"? What's flow content?

I think if people are interested in this they can find out more easily enough. Not sure if an explanation would really help as it would only be relevant here.


   *

     The address element is now scoped by the new concept of sectioning.

scoped? What does that mean?

What was it before (in HTML4)?

Not scoped. Details are in HTML5.


   *

     The b element now represents a span of text to be stylistically
offset from the normal prose without conveying any extra importance,
such as keywords in a document abstract, product names in a review, or
other spans of text whose typical typographic presentation is
emboldened.
   *

     The hr element now represents a paragraph-level thematic break.

"paragraph-level thematic break"? What's that? Is that a restriction?
Can't I user it wherever I want?

What was it before (in HTML4)?

Authors are assumed to know what it was before. I elided all similar questions.



3.4. Changed attributes

The following attributes are allowed but authors are strongly
encouraged to not use them and instead use an alternative solution:

Better to say "strongly discouraged"? Strongly encouraging someone to
not do something seems strange to me.

Fixed.


   *

     The summary attribute on table. The HTML5 draft defines several
alternative solutions.

Solutions to what? Please list them.

It already states they are in HTML5.


3.5. Absent Elements

The elements in this section are not to be used by authors. User
agents will still have to support them and various sections in HTML5
define how. E.g. the obsolete isindex element is handled by the parser
section.

The following elements are not in HTML5 because their effect is purely
presentational and their function is better handled by CSS:

(It's nice when you give clear rationale for decisions :) More like
the above would make this doc really useful )

You're not interested in what "purely presentational" means? ;-)


<snip>


The following elements are not in HTML5 because their usage affected
usability and accessibility for the end user in a negative way:

In what negative way?

http://wiki.whatwg.org/wiki/Rationale


   * frame
   * frameset
   * noframes

So what happens to these guys in a HTML5 UA?

Not relevant to authors.


The following elements are not included because they have not been
used often, created confusion, or their function can be handled by
other elements:

   * acronym is not included because it has created a lot of
confusion. Authors are to use abbr for abbreviations.

Booh! jokes:)

   * applet has been obsoleted in favor of object.
   * isindex usage can be replaced by usage of form controls.
   * dir has been obsoleted in favor of ul.

Finally the noscript is

s/the noscript is/the noscript element is

Oops, fixed.


<snip>

3.6. Absent Attributes

Some attributes from HTML4 are no longer allowed in HTML5. If they
need to have any impact on user agents for compatibility reasons it is
defined how they should work in those scenarios.

Defined where? (e.g., as part of the parsing model?)

Doesn't matter to authors.


   * rev and charset attributes on link and a.
   * shape and coords attributes on a.
   * longdesc attribute on img and iframe.
   * target attribute on link.
   * nohref attribute on area.
   * profile attribute on head.
   * version attribute on html.
   * name attribute on img (use id instead).
   * scheme attribute on meta.
   * archive, classid, codebase, codetype, declare and standby
attributes on object.
   * valuetype and type attributes on param.
   * axis and abbr attributes on td and th.
   * scope attribute on td.

Why were all these dropped? I would like to know the rationale for each one.

http://wiki.whatwg.org/wiki/Rationale


<snip>

4. APIs

HTML5 introduces a number of APIs that help in creating Web
applications. These can be used together with the new elements
introduced for applications:

   * API for playing of video and audio which can be used with the
new video and audio elements.

Be nice to link to it, or at least say what the interface is?

   * An API that enables offline Web applications.

Be nice to link to it, or at least say what the interface is?

   * An API that allows a Web application to register itself for
certain protocols or media types.

Be nice to link to it, or at least say what the interface is?

* Editing API in combination with a new global contenteditable attribute.

Be nice to link to it, or at least say what the interface is?

   * Drag & drop API in combination with a draggable attribute.

Be nice to link to it, or at least say what the interface is?

   * API that exposes the history and allows pages to add to it to
prevent breaking the back button.

Be nice to link to it, or at least say what the interface is?

I think these are all trivial enough to find within the HTML5 specification if you're interested. Or you can find them in blog posts, journals, etc.


4.1. Extensions to HTMLDocument

HTML5 has extended the HTMLDocument interface from DOM Level 2 HTML in
a number of ways. The interface is now implemented on all objects
implementing the Document interface so it stays meaningful in a
compound document context. It also has several noteworthy new members:

   *

     getElementsByClassName() to select elements by their class name.
The way this method is defined will allow it to work for any content
with class attributes and a Document object such as SVG and MathML.
   *

     innerHTML as an easy way to parse and serialize an HTML or XML
document. This attribute was previously only available on HTMLElement
in Web browsers and not part of any standard.

   *

     activeElement and hasFocus to determine which element is
currently focused and whether the Document has focus respectively.
   *

     getSelection() which returns an object that represents the
current selection(s).

Just text? or markup too?

Ranges iirc.


4.2. Extensions to HTMLElement

The HTMLElement interface has also gained several extensions in HTML5:

   *

     getElementsByClassName() which is basically a scoped version of
the one found on HTMLDocument.

What does it mean, "a scoped version"?

What is unclear about scoped?



   *

     innerHTML as found in Web browsers today. It is also defined to
work in XML context (when it is used in an XML document).
   *

     classList is a convenient accessor for className. The object it
returns exposes methods, has(), add(), remove() and toggle(), for

typo: returns exposes?

Clarified.


manipulating the element's classes. The a, area and link elements have
a similar attribute called relList that provides the same
functionality for the rel attribute.

What is that used for?

For manipulating relationships.


5. HTML5 Changelogs

The changelogs in this section indicate what has been changed between
publications of the HTML5 drafts. Rationale for changes can be found
in the [email protected] and [email protected] mailing list archives
and to some extent in the This Week in HTML5 series of blog posts.

And don't forget the "last week in HTML5" one too!;) I mean, if you
are plugging blog posts and all...

Sure...

Kind regards,


--
Anne van Kesteren
http://annevankesteren.nl/

Reply via email to