HTML was originally designed to be able to render text with formatting though a common, human readable means. <i> and <em> are technically different, but people tend to use them the same way. But they are not.
Since the italic and emphasis elements have the same appearance, why use one rather than the other? As with <b> and <strong>, one is an element intended for visual formatting and the other is a logical element. <i> tells the browser, "Show this text in italics". <em>tells the browser, "This text is important information, or a piece ofspoken dialogue that carries extra stress." The italic effect typicallyapplied to <em> elements is simply a visual representation of the tag's logical meaning.
Though their visual appearance is the same, italics and logicalemphasis might well have different meanings to surfers using nonvisualbrowsers. A speaking browser, reading text aloud to a blind visitor,would know to lay emphasis on words marked with <em>. <i>, however, might have no effect since its purpose is visual.
<em> should ideally be used for any text that carries logical stress (i.e. if the voice would change when reading the text aloud). <i>should be reserved for elements that are simply to be distinguishedvisually from the surrounding text (e.g. foreign language phrases, orepigraphs at the head of stories).
Now, HTML knows that there are two types of elements, paired tags and single tags. A paired tag says, "Start formatting this way until you encounter the end element, such as turning italics on until an ending </i> element is encountered. But there are other elements like <br> or <hr> that tell the formatting engine to take an action here and now and then be done with it.
This is different from XHTML which is an XML version of HTML and requires that documents be well-formed (and valid but that's another whole topic). A well-formed document is one in which each element has a closing element. Technically that means that a line feed would need to be written as <br></br>. Instead, you can use a short hand to tell the XML processor that there is no closing element by including the / at the end of the element, making <br />.
The reason behind XHTML is to make it easier to dynamicize web content. If you're really interested, I'll dig up a better and more in-depth history lesson for you.
Re: Technically....
HTML was originally designed to be able to render text with formatting though a common, human readable means. <i> and <em> are technically different, but people tend to use them the same way. But they are not. Now, HTML knows that there are two types of elements, paired tags and single tags. A paired tag says, "Start formatting this way until you encounter the end element, such as turning italics on until an ending </i> element is encountered. But there are other elements like <br> or <hr> that tell the formatting engine to take an action here and now and then be done with it.
This is different from XHTML which is an XML version of HTML and requires that documents be well-formed (and valid but that's another whole topic). A well-formed document is one in which each element has a closing element. Technically that means that a line feed would need to be written as <br></br>. Instead, you can use a short hand to tell the XML processor that there is no closing element by including the / at the end of the element, making <br />.
The reason behind XHTML is to make it easier to dynamicize web content. If you're really interested, I'll dig up a better and more in-depth history lesson for you.