|
About the Internet About Web Browsers Why Domain Names HTML vs XHTML Making Webpage Files Naming Webpage Files About HTML Tags Basic HTML Page DTDs and Doctype Tags Spaces and New Lines Special Characters Bold, Italics, More Writing Headlines Adding Links Making Lists Comments in HTML How to Add Images Sources of Images Image File Formats Optimizing Images Color in HTML & CSS "Web-safe" Color Chart Making Tables Formatting with Tables Making Forms Using Imagemaps Using Frames Meta Tags Intro to CSS Ways to include CSS Some Useful CSS CSS Hover for Links Promoting Your Site How-To's Homepage Links |
Blank Spaces and Paragraph FormattingWhitespace is characters such as space, tab or return ( Enter).
No matter how many whitespace characters you put in a row, or which ones you use, the browser will only show one single space. Line breaks, forced new lineIf you want to force a line break use the tag <br />. the text following the <br /> tag will continue on the next line. Don't use a <br / > tag at the end of every line. Let the browser wrap your text to Use a <br /> tag when you deliberately have short lines, such as in poetry. ParagraphsBegin paragraphs with a <p> tag and end them with a </p> tag. The browser will automatically skip a line between paragraphs. In HTML people often used to put a <p> tag between paragraphs to separate them, this is not correct in XHTML. Even in HTML, if you put any attributes in the <p> tag, then you will need a closing </p> tag. (Attributes are things like align= which will be discussed later.) "pre" formatted textYou can force the format, including extra spaces and
line breaks
to be exactly as you typed it,
by putting it in-between <pre> and </pre> tags.
As you can see <pre> causes the font to change to monospaced.
At some font and browser window size combinations this pre-formatted
section forces the content area of this page to be too big and squishes
the menu to the left because it doesn't wrap automatically.
Blockquote
|



Enter).