Home arrow HTML arrow Page 3 - 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 - Lists
(Page 3 of 5 )

Definition Lists

You may be wondering what you will do with the Definition Lists (the DL, DT, DD elements). Well, you can use them for dialogs: the name of the speaker goes in the DT element and what he says goes in the DD element. The problem here is that you will use more vertical space than if you start the speech on the same line as the name of the speaker. If you want to present your work this way (to economize vertical space), then use Cascading Style Sheets. The following example illustrates the point:


<DL>

<DT>John</DT>

<DD>I love you.<DD>


<DT>Mary</DT>

<DD>I love you too.</DD>


<DT>John</DT>

<DD>I like the way you walk.<br />

I like the way you talk.<br />

Above all, you are beautiful.

</DT>

<DT>Mary</DT>

<DD>Are you sure?</DD>

<DT>John</DT>

<DD>Yes.</DD>

</DL>


On a web page, this will appear as follows:


John

I love you.

Mary

I love you too.

John

I like the way you walk.

I like the way you talk.

Above all, you are beautiful.

Mary

Are you sure?

John

Yes.


You can also use the Definition Lists to give the meaning of words; the word goes in the DT element and the meaning goes in the DD element. Again the problem here is that you will use more vertical space than you would have if you presented your work as it is in the dictionary. To present your work as it is in the dictionary, you have to use Cascading Style Sheets.

IMAGES

Give Images Their Size

You might have noticed that when you open certain web pages, it looks as if the text jumps downwards. If the browser does not know the size of your image, when the page is being rendered, it will start by giving very little space for it. When the image finally comes, it will have to push the text down to make space for it. To avoid this problem, inform the browser of the size of the image by indicating its width and height in the style sheet.

ALIGNMENT

The HR element

The HR element draws a horizontal line. It would draw a line in a block element, such as BODY or DIV. You can use the horizontal line to give vertical visual separations to the content of a block. You can give any size you want to the line. Give the lines some nice colors where appropriate!

The horizontal line without any style associated with it appears as a groove. By giving the line a foreground color (in the style sheet), this groove is usually removed.

Next: Forms >>

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 5 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials