The content of an element is, generally speaking, whatever falls inbetween its opening and closing tags. Depending on the element, this can go from absolutely nothing to a piece of HTML document. This content is what will be affected by the element's functionality or meaning. For example, the
em element grants its content emphasis, and browsers usually display its text with a particular font style to make it stand out from regular text.
Some elements, known as empty elements, aren't allowed to have content and their declaration consist only of the opening tag with any number of attributes and events.
In the following example are three elements each containing a different type of content: the paragraph (
p element), cointaining other elements; a word with emphasis (
em element), containing plain text; and a button (
input (type=button) element), which is an empty element.
<p>Is this a <em>rainy</em> day? <input type="button" value="Yes"></p>
Is this a rainy day?