The Mudcat Café TM
Thread #12759   Message #105340
Posted By: davidmc24
15-Aug-99 - 09:41 PM
Thread Name: HTML Practice Thread
Subject: RE: HTML Practice Thread

For indentation, I would suggest using CSS attributes (CSS is an acronym, Cascading Style Sheets). CSS is a technology specifically designed to allow detailed formatting of web pages.

HTML is supposed to be primarily concerned with what the information IS, not what it looks like. In this way, a browser can display the content reasonably regardless of its output mechanism, be it a color display, a grayscale laptop LCD, a Braille writer, or a text-to-speech sythesis. When you use a tag for something other than its intended purpose (e.g., a definition list for indentation), you may well get unpredictable results in less common browsers.

If you use CSS for your formatting, you don't have to worry about this. (Though admittedly, CSS is only supported in IE3+ and Netscape 4+) For example, in CSS, you might use this HTML to achieve indentation of lyrics:
<div style="text-indent: .25in">This is text, indented a quarter inch</div>

This is text, indented a quarter inch

You don't have to use the style="" with only the DIV tag... you can use it with any tag that has a start and an end (paragraphs, bold, italic, etc.) I usually use DIV because it doesn't have any meaning in and of itself, and thus allows that tag to be only to apply my style information.