Web Design: Food for Thought

Word Wrapping

    This happens when a paragraph hits the end of a line and wraps to the next line. This is common, essential, and useful when dealing with a range of screen resolutions and window sizes. Please use word wrap to your advantage. It is very powerful once you understand. Rather than force folks to set their monitor to a particular resolution, compromise by controlling how the text wraps around the line ends. Don't get stuck on an exact look for your page. Consider several options for your page by taking advantage of this powerful, little text character. Look at this title:

<table width="1"><tr><td align="center">
HTML design techniques
</td></tr></table>
<table width="1"><tr><td align="center">
HTML design&nbsp;techniques
</td></tr></table>

   Well, these two tables are the coded exactly the same. Why doesn't the bottom table wrap the words 'design techniques' like the first table? This little, text character called the non-breaking space does this very useful job. This can be utilized in some very interesting ways. This can be useful when you want to control how a title or such wraps around the end of a line. Large text such as heading 1 can wrap strangely on low resolution monitors. Take a look at this example:

<table width="1"><tr><td align="center">
The miniature elephant home page
</td></tr></table>
<table width="1"><tr><td align="center">
The miniature&nbsp;elephant home&nbsp;page
</td></tr></table>

   The top title can be a rather ugly to the eye. However, the bottom title is more appealing to the eye. By leaving the normal spaces in some areas and non-breaking spaces in other areas you can control how the text wraps, if wrapping must occur. It is important to note that this text will only wrap if it is cramped for space. You should not put non-breaking spaces between all of the words, because this could cause the text to run off of the right side of the browser display when wrapping is necessary. Only put non-breaking spaces where the gluing must occur.

   Indenting a paragraph - Well, Hmmm. Do you remember your grade-school teacher scolding you for not indenting those paragraphs? I guess that whomever forgot to put a provision for indenting a paragraph was rebelling. Or were they? I figure that it was assumed we would use our old friend the non-breaking space. Insert three, four, or five non-breaking spaces to indent the paragraph. I use three NB spaces. I think that five spaces is a standard indent. Hey, I like to rebel a little. The editor should provide indentation, but, realistically it does not need to if you know how/why it works.