UK Webmaster Talk - Online Marketing - SEO


 

Clea HTML code

This is a discussion on Clea HTML code within the Programming Articles forums, part of the Webmaster Articles/Tutorials category; Clean Code... Clean code means that your HTML coding follows all specifications. Here are a few ways to keep your ...


Go Back   UK Webmaster Talk - Online Marketing - SEO > Webmaster Articles > Webmaster Articles/Tutorials > Programming Articles

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Notices

Reply

 

LinkBack Thread Tools Display Modes
Old 26-06-2005, 18:07   #1 (permalink)
Ultimo Supremo
 
Join Date: May 2005
Location: /public_html/Cgi-bin/
Posts: 1,417
iTrader: 0 / 0%
Morphmaster is a glorious beacon of light
Send a message via MSN to Morphmaster
Default Clea HTML code

Clean Code...

Clean code means that your HTML coding follows all specifications. Here are a few ways to keep your code clean:

* Don't type special characters into your code, instead type their escape code... many characters should NEVER be typed directly into HTML code... for example the "<", ">", the "?", "&", and the " itself. Instead, type &escape_code; (Ampersand, Escape Code for Character, then a semicolon). For these 5 characters, here are the escape codes...
o For the < type &lt;
o For the > type &gt;
o For the ? type &copy;
o For the & type &amp;
o For the " type &quot;

* Use quotes around values in attributes... For example, if you want a horizontal rule that is half of the screen width, type <hr width="50%"> rather than <hr width=50%>, or if you want one that is size 5 type <hr size="5"> rather than <hr size=5>.

* Don't overlap tags... Overlapping occurs when Tag A starts, Tag B starts, Tag A closes, then Tag B closes. This will cause errors in sensitive browsers. For Example, it will not render correctly in Navigator 4.0 Beta1, Netscape purposefully built into the browser so developers could catch errors.
Examples:
o Wrong Way (Overlaps):
<font size=+1><b>This is Bold and One Font Size Bigger</font></b>
Right Way (Doesn't Overlap):
<font size=+1><b>This is Bold and One Font Size Bigger</b></font>
o Wrong Way (Overlaps):
<a href="here.html"><i>This link is italicized</a></i>
Right Way (Doesn't Overlap):
<a href="here.html"><i>This link is italicized</i></a>


The Comment Tag...

If you are writing an HTML document, sometimes you may want to put little reminders to yourself with your code so that you will be able to interpret your coding better. A comment will not appear in a web browser when the page is displayed... it is only visible when the source code is viewed. You start commented text with <!-- and end it with -->.


Your own HTML page...

Add the following to your HTML page ("Home.htm"): (the blue text is what to add)

<html>
<head><title>My Home Page</title></head>
<!-- The body starts here - and a background image is loaded -->
<body background="bgnd.gif">

<!-- This is a heading, in blue -->
<center><font color="Blue"><h1>YOURNAME's Home Page</h1></font></center>
<!-- This is a horizontal line -->
<hr>
<!-- My name and the two images are all part of a link - which is a "mailto" link -->
This is the home page of <a href="mailto:YOUR EMAIL ADDRESS"><img src="bullet.gif" border=0><b>YOURNAME</b>.<img src="bullet.gif" border=0></a>
<p>Type something about yourself here. Describe briefly who you are and what you do for a living. Remember to use bold and italic text, for emphasis.</p>
<hr>
<h2>My favourite Web Sites</h2>
<br>
</body>
</html>
__________________
Thanks
Tom

Have you ever thought what it's like, to be wanderers in the fourth dimension? Have you? To be exiles?
Morphmaster is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
clea, code, html

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
5 Domain registrar august coupon code helloname Domain Names 0 24-08-2008 08:54
[PHP]Looking up a HTML page's source code Jeff12088 Php and MySQL 4 01-11-2005 23:51
php code help Lewis Website Design Forum 8 24-07-2005 22:02
Code Generator hdshngout Php and MySQL 3 16-07-2005 01:06
EA code benf Programming / Scripting / Coding 0 04-07-2005 02:19


All times are GMT +1. The time now is 01:58.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
UK Webmaster Forum © WebmasterTalk.co.uk | Design by Forbairt

Ad Management by RedTyger

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41