Skip to content

title attributes

Sid Vishnoi edited this page Jul 8, 2020 · 4 revisions

Guides

Configuration options

W3C Configuration options

Linter rules

Internal properties

Handled by ReSpec for you.

Special <section> IDs

HTML elements

Custom Elements

WebIDL

HTML attributes

CSS Classes

Special properties

Clone this wiki locally

Title attributes

Some CSS classes (ednote, example, note) use the title attribute to add text alongside the generated header.

Note that the contents of the title attribute follow regular attribute values escaping rules, and the unescaped result gets interpreted as markup. In other words, < and &lt; will be interpreted as the beginning of a start tag, and the double-escaped &amp;lt; is needed to produce the < character.

<p class="note" title="About <code>=></code> in EcmaScript">It rocks!</p>
<p class="note" title="About the &amp;lt;code&amp;gt; tag in HTML">
  It rocks too!
</p>

Would be exported as:

<div class="note">
  <div class="note-title marker">
    <span>Note: About <code>=&gt;</code> in EcmaScript</span>
  </div>
  <p>It rocks!</p>
</div>

<div class="note">
  <div class="note-title marker">
    <span>Note: About the &lt;code&gt; tag in HTML</span>
  </div>
  <p>It rocks too!</p>
</div>