HTML For Dummies: Attractive Sub-Headings That Stay With Their Text


It’s often ask how to keep sub-headings together with the text that follows. Many word processing programs automatically read a return (enter key) as a paragraph break. That separates the sub-heading from the text. Furthermore, paragraph breaks are used when the site decides to add a page break to your article. This often puts the sub-heading on one page and its text on another. Knowing all of this, here is how you can create sub-headings that stay with their text. It just takes a little HTML knowledge.

Instead of pressing the enter key, you simply put the <BR> tag between the sub-heading and the text.

Mary’s Inventory<br>Mary had a little lamb.

is rendered as:
Mary’s Inventory
Mary had a little lamb.

It’s that simple. Since the site doesn’t see a return, it doesn’t add a paragraph break and the text stays with the sub-heading.

You can even combine this with other tags to make you sub-heading stand out. I like to use bold and underline.

<b><u>Jack’s Plan</u></b><br>Step one: go up the hill.<br>Step two: fetch water.

is rendered as:
Jack’s Plan
Step one: go up the hill.
Step two: fetch water.

Italics are fair game, too.

<b><u><i>Jack’s Effort</i></u></b><br>Jack came tumbling down.

is rendered as:
Jack’s Effort
Jack came tumbling down.

You are now well-armed to create article submission whose final presentation is pleasing to both the web site and your readers. If you are using a code editor like TextPad or UltraEdit, this becomes easier because they add single returns as single returns and not paragraph breaks. You don’t even have to bother with the <BR>, but that’s a different topic for advanced users.

Happy writing!

Advertisements

2 Comments

Add yours →

  1. Thanks Barefoot, very helpful!

  2. Very useful tip Randy, thanks.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: