Vernacular

HTML Made Special

Markup as Text

This problem is simple and requires very little explanation. Yet it occurs altogether too often.

The following example should be familiar to most:

<div data-content="<ul><li>one<li>two…</ul>">…</div>
      

There are cases in which this can be needed, notably if the HTML being transmitted as text is unsafe. But as a general rule, if you have structure, keep it as structure — dont’t hide it as text.

↖︎ Back to list