7 ways to write "Better" HTML

+7 ways it will benefit your online business

Ca Phun Ung

Yelotofu

Introduction

Some definitions:

Introduction

7 Ways to write "Better" HTML

  1. Use a DOCTYPE declaration
  2. Don't Abuse the Good!
  3. Use the Right Tag for the Right Job
  4. Avoid Bed and BReakfast markup
  5. Headings are important
  6. Don't forget ALT text!
  7. Use CSS for presentation

1. Use a DOCTYPE declaration


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

1. Use a DOCTYPE declaration


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

1. Use a DOCTYPE declaration


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">

1. Use a DOCTYPE declaration

2. Don't Abuse the Good!

2. Don't Abuse the Good—TABLEs

2. Don't Abuse the Good—TABLEs


Guthrie MacFarlane
1.30pm Brett, John, David Roger
2.15pm Dean Lisa, Peter

2. Don't Abuse the Good—BLOCKQUOTEs

2. Don't Abuse the Good—BLOCKQUOTEs


<p>      Eric Meyer        wrote:</p>

<p>
 What's so interesting to me is that the guys who decided
 to focus on the positive went out and did something;
 those who want to mix in the negative seem to have
 nothing to offer except complaints.
</p>

<p>An excellent contrast between those who want to
build new things and those who want to tear them down.
</p>

2. Don't Abuse the Good—BLOCKQUOTEs


<p><cite>Eric Meyer</cite> wrote:</p>
<blockquote>
<p>
 What's so interesting to me is that the guys who decided
 to focus on the positive went out and did something;
 those who want to mix in the negative seem to have
 nothing to offer except complaints.
</p>
</blockquote>
<p>An excellent contrast between those who want to
build new things and those who want to tear them down.
</p>

2. Don't Abuse the Good—BLOCKQUOTEs


<p><cite>Eric Meyer</cite> wrote:</p>
<blockquote cite="http://meyerweb.../social-protocols/">
<p>
 What's so interesting to me is that the guys who decided
 to focus on the positive went out and did something;
 those who want to mix in the negative seem to have
 nothing to offer except complaints.
</p>
</blockquote>
<p>An excellent contrast between those who want to
build new things and those who want to tear them down.
</p>

2. Don't Abuse the Good—BLOCKQUOTEs


<p><cite>Eric Meyer</cite> wrote:</p>
<blockquote cite="http://meyerweb.../social-protocols/">
<p>
 What's so interesting to me is that the guys who decided
 to focus on the positive went out and did something;
 those who want to mix in the negative seem to have
 nothing to offer except complaints.
</p>
</blockquote>
<p>An excellent contrast between those who want to
build new things and those who want to tear them down.
</p>

3. Use the Right Tag for the Right Job

3. Use the Right Tag for the Right Job

4. Avoid Bed and BReakfast markup

4. Avoid Bed and BReakfast markup


<b>cool stuff recently discovered</b>
<br>
so and so pointed me to this site where they've
introduced this amazing new product.
when can i get one?
<br>
also cool is this new service offered by example.net.
this will save me so much time in my work.
<br>

4. Avoid Bed and BReakfast markup


<div class="entry">
<h2>cool stuff discovered</h2>
<p>
so and so pointed me to this site where they've
introduced this amazing new product.
when can i get one?
</p>
<p>
also cool is this new service offered by example.net.
this will save me so much time in my work.
</p>
</div>

5. Headings are important

5. Headings are important

6. Don't forget ALT text!

6. Don't forget ALT text!

7. Use CSS for presentation

7 ways it will benefit your online business

  1. Your pages will load faster
  2. Lower your hosting costs
  3. Lower the cost of a redesign
  4. Helps to maintain visual consistency
  5. Better search engine results
  6. More accessible to all viewers and user agents
  7. It's a winner!

Thank you!