Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q2018 What is the best way to indent?

irt.org | Knowledge Base | HTML | Q2018 [ previous next ]

Q2018 What is the best way to indent?

The short answer here is: There is no "best" way to indent your text. If you are working on a web page that will only be viewed with one browser, then there are many good ways, but unless you are creating an intranet site, that isn't likely.

The consensus of answers seems to be that the use of either the <pre> tag, or adding non breaking spaces (&nbsp;) at the beginning of each paragraph, or tables happen to be the "best" choices. A non breaking space character is the same size as a normal space character for the font currently being used.

David Sentelle writes:

Another good way to indent paragraphs is to have an image as a placeholder. I've created a GIF file that is one pixel by one pixel. That one pixel I set as the transparent color. I call this file cleardot.gif. Then in my paragraphs I include a call to that tag, like so...

<p align="left"><img src="cleardot.gif" height="1" width="30"> Here's the paragraph </p> 

This does result in the indention being different sizes (relative to page size) when viewed in different resolutions. I've not tried (bet I will) but I don't think that the following would work:

<img src="cleardot.gif" height="1" width="10%">

Other than the different indention size in different resolutions, this is a nice looking way to fake out HTML into indenting your paragraphs.

Feedback on 'Q2018 What is the best way to indent?'


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.