HTML and CSS Reference
In-Depth Information
• The <h1> and </h1> header tag pair indicates a headline specifying some important
information.
• The <hr> tag, which has a self-identifying end tag ( <hr /> ) under XHTML, inserts
a horizontal rule, or bar, across the screen.
• The <p> and </p> paragraph tag pair indicates a paragraph of text.
• A special character is inserted using a named entity ( &hearts; ), which in this case
inserts a heart dingbat character into the text.
• The <em> and </em> tag pair surrounds a small piece of text to emphasize which a
browser typically renders in italics.
There are numerous other markup elements that may be employed, all of which will be
explored throughout the topic, but for now this sampling is enough to get our first example
rendered in a browser.
N OTE Examples in the topic will generally be presented in HTML5. Syntax specific to particular
browsers, older HTML variants, or XHTML will always be noted when used.
Viewing Markup Locally
Using a simple text editor, type in either one of the previous examples and save it with a
filename such as helloworld.html or helloworld.htm; you can choose which file extension to
use, .htm or .html , but whichever you pick for development, aim to be consistent. This
topic uses .html for all of the files.
After you save the example file on your local file system, open it in your Web browser
by opening the File menu and choosing Open, Open Page, or Open File, depending on your
browser:
Search WWH ::




Custom Search