HTML Tutorial |
Lessons
|
So far, you have learned the essentials of setting up a web page. But it is all source code that will not display on your page. Our next step is to look at adding text to your web page and the ways in which you can format the text. Headings Use of Headings is the way to increase or lessen the importance or the prominence of certain portions of text within your document. There are six levels of headings, from Heading 1 through Heading 6. Heading 1 (H1) is the most prominent (large and bold) and Heading 6 (H6) is least prominent. By default, browsers will display the six heading levels in the same font, with the point size decreasing as the importance of the heading decreases. Here are all six HTML pairs, in descending order of size and prominence: <H1>Heading 1</H1><H2>Heading 2</H2><H3>Heading 3</H3><H4>Heading 4</H4><H5>Heading 5</H5><H6>Heading 6</H6>Paragraphs Most Web pages with any substance, use paragraphs - at least to some extent. The key point to remember is that multiple spaces and hard-returns in your code mean nothing in terms of what will be displayed. By this I mean that if you add any more than one character space between words, you will still only get one space. Hard returns do not show up at all. In other words: is written like Will simply appear as: However, there are ways to include these elements (such as line breaks) in the display of your paragraph. Line Break If you want to end a line after a certain word, but don't want to start a new paragraph, you need a line break, which is created by using the <BR> tag. This forces a line break wherever you place it in the content (that is, whatever is after the <BR> tag will start from the left margin of the next line on the screen.) <P>Text that is written Will appear as: Although the coding is much harder for us to read and understand, the example above would display the same if it were written all on one line as: <P>Text that is written <BR>like this. </P> Inserting Spaces Remember, normal text includes no more than one space between words, regardless of how many spaces, tabs, etc., you include. Should you have the need to insert additional spaces in between words, there is a special code you can use. It is and does not need to be housed in its own tag brackets. This is my special bit of text. Will display as: Although you will not need to use them all of the time (only when the browser has difficulty reading the characters) some other special codes that you may find useful are: Blockquote
<blockquote> Here is an example of text that would need to be contained in a blockquote. If you have a direct quote that exceeds three lines, or merely want to set a certain bit of text apart from the rest, you may use the blockquote. It will indent the text from each side. </blockquote> This section of text is surrounded by the blockquote tags. A blockquote can exist inside of a paragraph, and always lives on its own line (which is to say, there is an automatic line break that is put in before and after the blockquote, just as with headings or paragraphs). Aligning Text Just like with the Headings, one can set the alignment of single lines. But it is also quite convenient to set the alignment of entire blocks of text by using Paragraph tags. <P ALIGN="left"> <P ALIGN="center"> <P ALIGN="right"> This would display as: that takes up a second and third line This is my special bit of text This is my special bit of text This is my special bit of text
|
Notes Superfluous Spaces: Placing tags at end or beginning: for you to go in and alter text or find out why something is not appearing as it should, you will be thankful that you used effective organizational techniques. Ending a <BR> tag
|