Originally Posted by
chipstorm
The main thing about HTML to know is that there are different code
elements that make the site what it is, so the more you know about each of them, the more control you have over the look and function of your site. For instance, you can see on my page
http://www.usbmemorydirect.com/ that I use many elements, like text, links, tables, stylesheets, etc. All these elements can be changed based on the
attributes available for them.
Unfortunately you seem to have missed that those 'attributes' really don't belong in your HTML anymore and have no place when writing modern code. What you have there is called 'presentational markup', a concept that should have gone the way of the dodo a decade ago and would have if browser makers weren't so far behind the curve. Today, there is no excuse to be using attributes like align, cellpadding, border, or even style. That's what CSS is for! HTML should no longer say how things are going to appear (in fact it was NEVER MEANT TO DO THAT) and instead should say what things ARE. Appearance goes in your stylesheet.
... and that's before we talk about the train wreck of tables and that you try to use the same ID more than once. 15k of markup when you only have 3k of actual content on the page is usually an indication of doing something wrong... What do I mean by wrong?
Things like this:
Code:
<table>
<tr>
<td>
<div style="font-size:13px;color:#27537A;text-align:center"><b>Wholesale Promotional Custom USB Flash Drives!</b></div><br />
<div style="text-align:justify;">
Here at USBMemoryDirect we provide you with fast and high quality Custom USB Flash Drives at unbeatable
wholesale prices, coupled with a fast and efficient service. Get the
best quality and best priced Flash memory here. Our flash memory and
Custom USB Drives use only the highest quality major brand memory.
<br />
</div>
</td>
</tr>
If it only has one TD per TR, what the **** are you using a table for? You have styling inlined in your markup for no good reason, are using a presentational break at the END of a perfectly good block level container, a DIV with inlined styling for what is obviously a heading (we have tags for headings!), a paragraph of content that is not marked up as a paragraph, etc, etc.
There is NO good reason for that entire section of markup to be more than
Code:
<h2>
Wholesale Promotional Custom USB Flash Drives!
</h2>
<p>
Here at USBMemoryDirect we provide you with
fast and high quality Custom USB Flash Drives at
unbeatable wholesale prices, coupled with a fast
and efficient service. Get the best quality and best
priced Flash memory here. Our flash memory and
Custom USB Drives use only the highest quality
major brand memory.
</p>
The table is unneccesary, you used DIV for elements that should have SEMANTIC wrapping tags, etc, etc... In another section you have ALL the TD in a table with align="center" on them... if they are all the same put a class on the table and nab all those TD in one place - that along could shave a K or two off the code and make it clearer/easier to maintain... or the unneccesary 'serv' span - it's the only text NOT in an anchor, you don't need a wrapper to style those.
There is really no reason for that page to be more than... eh, 7k of markup at the max, and I'm willing to bet it could be done in less than that.
Not your fault, 99% of the books on shelves are a decade or more out of date, as are the skill sets of most people TEACHING HTML... Though most educators are completely useless when it comes to coding practices being they consider the steaming pile of manure known as dreamweaver to be a tool everyone should use.
Which if you read that book Dan linked to, you will find that most of what you 'know' about writing a website is skipped right past as if it never existed - FONT, CENTER, ALIGN, VALIGN - that **** doesn't belong in your HTML.
Watch Ian's YT video promoting the book - the part where he talks about going into a bookstore and being shocked at what was on shelves is SPOT ON.
http://www.youtube.com/watch?v=9wZAE_3L3HM
Bookmarks