0% found this document useful (0 votes)
45 views1 page

About The Lab Wednesday Classes Workshops: Grocs Dl1 Cportal

The document provides 12 principles for writing clean code, beginning with using a strict DOCTYPE to lay a foundation for beautiful HTML and CSS. It discusses the importance of semantic HTML for building a strong website, and outlines some principles for improving poorly-written HTML, such as using a strict DOCTYPE and avoiding tables for layout.

Uploaded by

Xiaoli Ma
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views1 page

About The Lab Wednesday Classes Workshops: Grocs Dl1 Cportal

The document provides 12 principles for writing clean code, beginning with using a strict DOCTYPE to lay a foundation for beautiful HTML and CSS. It discusses the importance of semantic HTML for building a strong website, and outlines some principles for improving poorly-written HTML, such as using a strict DOCTYPE and avoiding tables for layout.

Uploaded by

Xiaoli Ma
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

DLI

DESIGN LAB ONE


GROCS DL1 cPortal
2009

Nov. 12 Wed
About the Lab 12 Principles for Keeping Your Code Clean
By Chris Coyier

Beautiful HTML is the foundation of a beautiful website.


Wednesday When I teach people about CSS, I always begin by
telling them that good CSS can only exist with equally good
HTML markup. A house is only as strong as its
foundation, right? The advantages of clean, semantic
Classes HTML are many, yet so many websites suffer
from poorly written markup.

Let’s take a look at some poorly written HTML,


Workshops discuss its problems, and then whip it into shape!
Bear in mind, we are not passing any judgment on
the content or design of this page, only the markup
Nov. 12 Wednesday Tea
that builds it. If you are interested, take a peek at 3:15-5:30 PM
the bad code and the good code before we start
so you can see the big picture.
Now let’s start right at the top. December 2009
1. Strict DOCTYPE 12345
6 7 8 9 10 11 12
If we are going to do this, let’s just do it right. No
need for a discussion about whether to use HTML 13 14 15 16 17 18 19
4.01 or XHTML 1.0: both of them offer a strict version
that will keep us nice and honest as we write our code.
20 21 22 23 24 25 26
27 28 29 30 31
Our code doesn’t use any tables for layout anyway
(nice!), so there really is no need for a
transitional DOCTYPE.

Resources:

* W3C: Recommended DTDs to use in your


Web document
* Fix Your Site With the Right DOCTYPE!
* No more Transitional DOCTYPEs, please

You might also like