Home arrow HTML arrow 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 / 7
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

HTML Tips
(Page 1 of 5 )

GLOBAL STRUCTURE

Block and Inline Elements

The difference between a block-level element and an inline element may not be very clear. However, the following simplified definition should keep you on the right track: a block-level element is one that has a line break before and after it. An inline element is one that does not have a line break before and after it.

X and Y Coordinates

If you design web pages by hand, from time to time you may want to know the position of a point or an element. This is the JavaScript that tells you that:


<script type="text/javascript">

function coordinates(event)

{

x=event.clientX

y=event.clientY

alert("X=" + x + ", Y=" + y)

}

</script>


<body onmousedown="coordinates(event)">


You put the JavaScript in the HEAD element of the HTML file. You add the onmousedown attribute (event) to the start tag of the BODY element as shown above. With this code in effect, if you click anywhere on the client area of the web page, an alert box will pop up to show the position of the cursor. If you want to know the position of a point on a web page, just click the point. The values are given in pixels. They are measurements from the top-left corner of the client area of your web page: going to the right gives positive X values and going down gives positive Y values (which is opposite to conventional graphs).

Next: Text >>

blog comments powered by Disqus
HTML ARTICLES

- Does HTML5 Need a Main Element?
- Revisiting the HTML5 vs. Native Debate
- HTML5: Not for Phone Apps?
- HTML5 or Native?
- Job Hunting? Freelancer.com Lists This Quart...
- HTML5 in the News
- Report: HTML5 Mobile Performance Lags
- The Top HTML5 Audio Players
- Top HTML5 Video Tutorials
- HTML5: Reasons to Learn and Use It
- More of the Top Tutorials for HTML5 Forms
- MobileAppWizard Releases HTML5 App Builder
- HTML5 Boilerplate: Working with jQuery and M...
- HTML5 Boilerplate Introduction
- New API Platform for HTML5

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




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