em is an HTML tag that is used to specify emphasized text within an HTML document. While the i (italics) tag is not deprecated in the HTML specification, it has been superceded by the em tag. This is because HTML is supposed to define structure rather than style. While on the visual end, they both seem to do the same thing, specifying emphasis of some text is structural, while specifying that some text should be italicized is stylistic.
See also: b, cite, i, s, strike, strong, tt, u
There are no required HTML attributes for the em tag, and in fact, attributes are seldom used with this element. Regardless, the following are all valid options for the em tag in your HTML documents:
To use the em tag, simply place opening and closing HTML tags around the letters or words. For example:
I like to use <em>emphasized text</em> in my sentences.
On browsers that support this tag, this will usually cause the words "emphasized text" to appear in italics.
The purpose of this tag is to structure your document for easier viewing and parsing. Therefore, the emphasis tag should not be used simply for creating italicized
text. If this is your goal, you should instead use Cascading Style Sheets
to accomplish this.
E2 does provide limited support for the em tag. E2 does not provide support for any of this tag's HTML attributes. Below is how your browser displays the example above here on Everything2:
I like to use emphasized text in my sentences.
If you would like to use this tag with any or all of its attributes, you can do so in your Notelet Nodelet.
Common Browser Implementations*
Most web browsers support this tag, as it has been around since at least HTML version 2. Nearly every visual user agent displays emphasized text in a similar manner (italics), however you may see some very slight differences depending on your browser or operating system.
Previous HTML Tag: dt
Next HTML Tag: fieldset (next E2 supported HTML tag: h1)
See Also: HTML tags and HTML attributes
* Please feel free to send me information if you know of any browsers that implement this tag in an unusual manner.