|
|
|||||||
| Register | FAQ | Calendar | Radio and TV | NP Shop | Search | Today's Posts | Mark Forums Read |
| Startup Guide Helpful articles for new webmasters starting out in the business. |
![]() |
![]() |
![]() |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Admin
Join Date: Feb 2004
Posts: 314
Points: 0
|
LESSON 3 - 10 STEP HTML DIET
<table width="93%" border="0">
<tr> <td width="100%" style="color: #3d3d3d; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; font-family: verdana, arial, sans-serif"> <ol type="1"> <li><font face="Verdana">Use fewer files and directories <br> <ul type="disc"> <li>Every file is a separate call to the server. </li> <li>Instead of using many small images you might consider using an imagemap. </li> <li>Decrease the number of directory structure levels. </li> </ul> <p> </li> <li>Limit your spacing <ul type="disc"> <li>While we know that spaces in your code, as a rule, should not effect the layout, it does effect how it's parsed. Decrease or eliminate the spaces between your lines of code. </li> </ul> <p> </li> <li>Use relative addressing instead of absolute addressing. <ul type="disc"> <li>instead of using href=http://www.mydomain.com/images/pic1.jpg use href="../images/pic1.jpg" </li> <li>to really speed things up use the <base>tag in the <head>like this:<br><br><base href=http://www.mydomain.com><br> <br>then use relative addressing in the rest of the page. </li> </ul> <p> </li> <li>Use HTML to control spacing when possible <ul type="disc"> <p>Instead of using a spacer.gif to manipulate space, try using &nbsp; for horizontal spacing and the <br> and <p>tags for vertical spacing. </p> </ul> <p> </li> <li>Eliminate repetitive tags <ul type="disc"> <li>This is something you'll often find in pages created with point and click web applications (WYSIWYG HTML editors) For example:<br> <br> <font face="arial">Hello World</font> <font face="arial">Welcome to my web page.</font><br> <br> In this example the first </font> and the second <font face="arial"> could be eliminated. </li> </ul> <p> </li> <li>Eliminate attributes with default values <ul type="disc"> <li>For example, you don't need to use these:<br> <body text="black"><br> <div align="left"><br> <font size="3" color="silver" face="times"><br> </li> </ul> <p> </li> <li>Use short file names and directories <ul type="disc"> <li>Instead of href="../imagefiles/companylogos/advertisements.html<br> try href="../imgs/logos/ads.html </li> </ul> <p> </li> <li>Use Cascading Style Sheets <ul type="disc"> <li>Use CSS to position your content. It requires less code and you have more accurate control over layout. </li> </ul> <p> </li> <li>Beware of WYSIWYG code trash <ul type="disc"> <li>Many web authoring apps add their own proprietary code. FrontPage is notorious for this. Beware!! </li> <li>Clean up your META tag. You don't need the following info in your METAs:<br> <META NAME="generator" content="Microsoft FrontPage 4.0"><br> <META NAME="ProgId" CONTENT="FrontPage.Editor.Document"> </li> </ul> <p> </li> <li>Table Savvy <ul type="disc"> <li>Avoid nesting tables. Rather than creating complex table layouts, use the attributes rowspan and colspan to control content layout. </li> <li>If you can, fill empty table data cells with &nbsp; This weighs less than a spacer.gif. </li> <li>Tables take time. Even if you need to use a table for some of your content, the entire page doesn't have to be in a table. </li> </ul> </li> </ol> <p>There you have it. Follow the HTML Diet and your web pages will be looking and feeling healthier immediately!!! </font> </td> </tr> </table> Click Here To Discuss This Or Ask Questions On The Netpond Message Board! |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
![]() |
![]() |