Home arrow HTML arrow Page 2 - HTML Tips
HTML

HTML Tips


In this article, I will give you some HTML tips that will enable your web page to have a more professional quality. You can try all the codes that I give with the tips. If this piques your interest (and I know it does), then please keep reading.

Author Info:
By: Chrysanthus Forcha
Rating: 4 stars4 stars4 stars4 stars4 stars / 3
March 26, 2008
TABLE OF CONTENTS:
  1. · HTML Tips
  2. · Text
  3. · Lists
  4. · Forms
  5. · Form Elements for Uploading Files

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
HTML Tips - Text
(Page 2 of 5 )

Paragraphs

If you have text made of paragraphs, make each paragraph the content of a P element. This way you can give each paragraph consistent formatting. This policy can also be helpful when you want to create a template for a web page.

When to use Preformatted Text

Scientific analysis, such as mathematical solutions and programming code (segments), are usually presented in a particular format. A lot of white space is used with such presentation. Put this type of presentation within the content of the PRE element. Any arrangement of text in the PRE element appears on the web page exactly as it is in the PRE element. Other examples of what you can put in the PRE element are poems and lyrics of songs. The following example shows how a mathematical solution is preformatted:


<pre>

<b>Example</b>

Find the LCM of 36, 54, 60 and 80.


<b>Solution</b>

36 = 2 X 2 X 3 X 3

54 = 2 X 3 X 3 X3

60 = 2 X 2 X 3 X 5

80 = 2 X 2 X 2 X 2 X 5


LCM = 2 X 2 X 2 X 2 X 3 X 3 X 3 X 5

= 16 X 27 X 5

= <u>720</u>

</pre>


On a web page this will appear as follows:


Example

Find the LCM of 36, 54, 60 and 80.

Solution

36 = 2 X 2 X 3 X 3

54 = 2 X 3 X 3 X3

60 = 2 X 2 X 3 X 5

80 = 2 X 2 X 2 X 2 X 5


LCM = 2 X 2 X 2 X 2 X 3 X 3 X 3 X 5

= 16 X 27 X 5

= 720


Note that the PRE element can have other elements, such as the Bold and Underline elements.

Also note: the horizontal tab character is usually interpreted by browsers as the smallest non-zero number of spaces necessary to line characters up along tab stops that are every 8 characters. I strongly discourage you from using horizontal tabs in preformatted text because this would lead to misaligned documents.

Increasing Vertical Spaces

The Line Break element causes the next element to appear on the next line. A line break at the beginning of a block creates a blank line at the beginning of the block. You can increase the vertical space in a block using the line break "<br />" element.

Next: Lists >>

blog comments powered by Disqus
HTML ARTICLES

- HTML5 Boilerplate: Working with jQuery and M...
- HTML5 Boilerplate Introduction
- New API Platform for HTML5
- BBC Adopts HTML 5, Mozilla Addresses Issues
- Advanced Sticky Footers in HTML and CSS
- HTML and CSS Sticky Footers
- Strategy Analytics Predicts HTML5 Phones to ...
- HTML5 Guidelines for Web Developers
- Learning HTML5 Game Programming
- More Engaging CSS3 and HTML Background Effec...
- Engaging HTML and CSS3 Background Effects
- More Web Columns with CSS3 and HTML
- Columns with CSS3 and HTML
- Creating Inline-Block HTML Elements with CSS
- Drag and Drop in HTML5: Parsing Local Files

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 6 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials