Non-breaking Spaces

The HTML non-breaking space character entity works the same as the space bar on your keyboard. Instead of pressing an actual key to indent a single line or the first line of a paragraph, however, type the HTML character entity   instead. For example, to indent five spaces, insert the following code directly before the line of text:

Block Quote Tag

Website templates, blogging software or Web applications may include CSS code for font properties, background-colors, borders, padding or margins that format your blockquotes in ways that may not be appropriate or necessary. Use inline CSS code to override default blockquote styles. For example, the style to remove borders from blockquotes you use to indent text will resemble the code below:

 Tag

The HTML tag forces the browser to display text formatted the way you typed it. Use the space bar or tab key to indent text the way you prefer. Add indentation to one or all lines of text you include between the tag pair. Unlike the tag, however, you may insert as many tabs or spaces as you desire into in front of each line of text. Because Web pages are plain-text files, your HTML editor converts tabs to spaces. The number of spaces that your HTML editor inserts may not be the same number of spaces that the Web browser will display, however.

Indentation With CSS

Use the CSS text-indent or margin-left properties to indent your text. The text-indent property will indent the first line of text between a pair a specific length rather that a set number of spaces or tabs. For example, add the following style to a to indent the first line of text it contains 10 pixels: Indent all lines within paragraph or div using the margin property. For example adds 10 pixels of empty spaces to the left of all text between a or tag pair. Make margin or text-indent indentation rules apply to all the tags within a Web page or entire website by adding them to an internal or external style sheet. For example, the following style indents all document paragraphs 10 pixels to the right: Writer Bio

How to Indent Text With HTML - 41