This is a snapshot of an early working draft and has therefore been superseded by the HTML standard.

This document will not be further updated.

HTML 5

Call For Comments — 27 October 2007

9.1. Presentational markup

9.1.1. WYSIWYG signature

WYSIWYG editors must include a meta element in the head element whose name attribute has the value generator and whose content attribute's value ends with the string "(WYSIWYG editor)". Non-WYSIWYG authoring tools must not include this string in their generator string.

This entire section will probably be dropped. The intent of this section was to allow a way for WYSIWYG editors, which aren't going to use semantic markup, to still write conforming documents, while not letting it be ok for hand-coding authors to not use semantic markup. We still need some sort of solution to this, but it's not clear what it is.

9.1.2. The font element

Transparent block-level element, and transparent strictly inline-level content.

Contexts in which this element may be used:
Where block-level content is allowed.
Where strictly inline-level content is allowed.
Content model:
Transparent.
Element-specific attributes:
style
DOM interface:
interface HTMLFontElement : HTMLElement {
  readonly attribute CSSStyleDeclaration style;
};

This entire section will probably be dropped. The intent of this section was to allow a way for WYSIWYG editors, which don't have enough information to use the "real" "semantic" elements, to still make HTML pages without abusing those semantic elements (since abusing elements is even worse than not using them in the first place). We have still got to find a solution to this, while not letting it be ok for hand-coding authors to abuse the style="" attribute.

The font element doesn't represent anything. It must not be used except by WYSIWYG editors, which may use it to achieve presentational affects. Even WYSIWYG editors, however, should make every effort to use appropriate semantic markup and avoid the use of media-specific presentational markup.

Conformance checkers must consider this element to be non-conforming if it is used on a page lacking the WYSIWYG signature.

A font element can only contain content that would still be conformant if all elements with transparent content models were replaced by their contents.

The following would be syntactically legal (as the output from a WYSIWYG editor, though not anywhere else):

<!DOCTYPE HTML>
<html>
 <head>
  <title></title>
  <meta name="generator" content="Sample Editor 1.0 (WYSIWYG editor)">
 </head>
 <body>
  <font style="display: block; border: solid">
   <h1>Hello.</h1>
  </font>
  <p>
   <font style="color: orange; background: white">How</font>
   <font style="color: yellow; background: white">do</font>
   <font style="color: green; background: white"><em>you</em></font>
   <font style="color: blue; background: white">do?</font>
  </p>
 </body>
</html>

The first font element is conformant because h1 and p elements are both allowed in body elements. the next four are allowed because text and em elements are allowed in p elements.

The style attribute, if specified, must contain only a list of zero or more semicolon-separated (;) CSS declarations. [CSS21]

We probably need to move this attribute to more elements, maybe even all of them, though if we do that we really should find a way to strongly discourage its use (and the use of its DOM attribute) for non-WYSIWYG authors.

The declarations specified must be parsed and treated as the body of a declaration block whose selector matches just that font element. For the purposes of the CSS cascade, the attribute must be considered to be a 'style' attribute at the author level.

The style DOM attribute must return a CSSStyleDeclaration whose value represents the declarations specified in the attribute, if present. Mutating the CSSStyleDeclaration object must create a style attribute on the element (if there isn't one already) and then change its value to be a value representing the serialised form of the CSSStyleDeclaration object. [CSSOM]