<mark> Tag Syntax

<body>
   ...
   ... phrasing content expected ...<mark>... phrasing content ...</mark>...
   ...
</body>
Rules for coding HTML mark elements

Make sure you understand the difference between a tag and element and are familiar with the definitions of namespace and other HTML terms.

  1. Code the mark element where phrasing content is expected.
  2. Begin the mark element with a starting <mark> tag. The element name uses lower case letters and should be in the HTML namespace, which it will pick up automatically from the xmlns attribute on the <html> tag.
  3. Include any HTML global attributes on the <mark> tag as appropriate.
  4. Inside the mark element, between the starting <mark> tag and the ending </mark> tag, code the inner HTML phrasing content.
  5. End the mark element with a matching </mark> closing tag.
Content Model
Content of the mark element

The content of the mark element can include HTML comments, text content and only those HTML tags that can be used in phrasing content.

Dynamically inserting a <mark> tag