Search code examples
htmltext

What HTML elements are meant to contain text?


What HTML elements are meant or are designed to contain visible text (HTML4/XHTML) ? Planning to make a stylesheet to style them.


Solution

  • Some of these are defined as block-type and some as text-level. But they were meant to contain texts (or at least are used as text-wrappers.)

    • <tt>
    • <i>
    • <b>
    • <big>
    • <small>
    • <em>
    • <strong>
    • <dfn>
    • <code>
    • <samp>
    • <kbd>
    • <var>
    • <cite>
    • <abbr>
    • <acronym>
    • <sub>
    • <sup>
    • <span>
    • <bdo>
    • <address>
    • <div>
    • <a>
    • <object>
    • <p>
    • <h1>, <h2>, <h3>, <h4>, <h5>, <h6>
    • <pre>
    • <q>
    • <ins>
    • <del>
    • <dt>
    • <dd>
    • <li>
    • <label>
    • <option>
    • <textarea>
    • <fieldset>
    • <legend>
    • <button>
    • <caption>
    • <td>
    • <th>
    • <title>
    • <script>
    • <style>
    • <blockquote>