Things That Don't Change -- SGML Basics
Here are some examples of the basic logical styles and the code that specifies them. This code is identical whether using version 3.2 or version 4.0 of HTML:
|
Here are detailed instructions for setting up hyperlinks Here are detailed instructions for <A HREF="link.html">setting up hyperlinks</A> Please note that this example uses a Relative Address | |
Text marked up as strong will usually render as bold. <STRONG>Text marked up as strong will usually render as bold.</STRONG> |
Text marked up as emphasised will usually render as italic. <EM>Text marked up as emphasised will usually render as italic.</EM> |
Heading Style <H1><H1>Heading Style <H1></H1> Heading Style <H2><H2>Heading Style <H2></H2> Heading Style <H3><H3>Heading Style <H3></H3> Heading Style <H4><H4>Heading Style <H4></H4> Heading Style <H5><H5>Heading Style <H5></H5> Heading Style <H6><H6>Heading Style <H6></H6> |
Unordered Lists are indented from the margin and each List Item is preceded by a bullet:
<LI>Unordered List Item 2</LI> <LI>Unordered List Item 3</LI> <LI>Unordered List Item 4</LI> <LI>Unordered List Item 5</LI></UL> |
Ordered Lists are also indented from the margin and each List Item is preceded by a number. When using HTML 3.2, the first number of an ordered list can be set using the start attribute and the number of a particular list item and those that follow it can be set using the value attribute as demonstrated below. These attributes are deprecated in HTML 4.0.
<LI>Ordered List Item 2</LI> <LI value=15>Ordered List Item 15</LI> <LI>Ordered List Item 16</LI> <LI>Ordered List Item 17</LI></OL> | |
Address text line 1 Address text line 2 Address text line 3 <ADDRESS>Address text line 1 Address text line 2 Address text line 3</ADDRESS> | |
Text marked up as a citation will generally display as italic. The citation element is used to delineate text which is taken from sources other than the current source, or possibly by a different author. The citation tag can be useful if you quote the works of another author and your pages are likely to be searched for references to other works. <CITE>Text marked up as a citation will generally display as italic. The citation element is used to delineate text which is taken from sources other than the current source, or possibly by a different author. The citation tag can be useful if you quote the works of another author and your pages are likely to be searched for references to other works.</CITE> |
Text marked up as sample is frequently used to show code examples, whether HTML code or executable code such as basic or C++. It renders in a monospaced font, similar to preformatted text, however, unlike preformatted text, whitespace characters are not rendered literally. <SAMP>Text marked up as sample is frequently used to show code examples, whether HTML code or executable code such as basic or C++. It renders in a monospaced font, similar to preformatted text, however, unlike preformatted text, whitespace characters are not rendered literally.</SAMP> |
Text marked up as blockquote will usually display in the browser's default font, but it will be indented somewhat from the margin of the page. If blockquote text is the content of a table cell, it will be indented from the margins defined by the table cell. Text marked up as blockquote will usually display in the browser's default font, but it will be indented somewhat from the margin of the page. If blockquote text is the content of a table cell, it will be indented from the margins defined by the table cell. Text marked up as blockquote will usually display in the browser's default font, but it will be indented somewhat from the margin of the page. If blockquote text is the content of a table cell, it will be indented from the margins defined by the table cell.<BLOCKQUOTE>Text marked up as blockquote will usually display in the browser's default font, but it will be indented somewhat from the margin of the page. If blockquote text is the content of a table cell, it will be indented from the margins defined by the table cell. Text marked up as blockquote will usually display in the browser's default font, but it will be indented somewhat from the margin of the page. If blockquote text is the content of a table cell, it will be indented from the margins defined by the table cell. Text marked up as blockquote will usually display in the browser's default font, but it will be indented somewhat from the margin of the page. If blockquote text is the content of a table cell, it will be indented from the margins defined by the table cell.</BLOCKQUOTE> | |
Preformatted text is rendered in a monospaced font, exactly as it is typed in, which means that if I type a return here the text will render with a return in that place. Browsers are designed so that they will only recognize one whitespace character (ascii 032) in a row, which means that if the text is not marked up as preformatted this text will appear with only one space between it and the text which surrounds it. Preformatted text, however, will be rendered with as many whitespace characters as are typed into the original text. Special characters such as tag delimiters ( < and > ), ampersands ( & ), and quotation marks ( " ) are rendered literally and do not need to be escaped in preformatted text. This has obvious advantages and disadvantages.<PRE>Preformatted text is rendered in a monospaced font, exactly as it is typed in, which means that if I type a return here the text will render with a return in that place. Browsers are designed so that they will only recognize one whitespace character (ascii 032) in a row, which means that if the text is not marked up as preformatted this text will appear with only one space between it and the text which surrounds it. Preformatted text, however, will be rendered with as many whitespace characters as are typed into the original text. Special characters such as tag delimiters ( < and > ), ampersands ( & ), and quotation marks ( " ) are rendered literally and do not need to be escaped in preformatted text. This has obvious advantages and disadvantages.</PRE> |
|