Beruflich Dokumente
Kultur Dokumente
com/what-beautiful-html-code-looks-like/
I have an addiction. I can’t help but view source on every nice looking website I see. It’s like if
you had x-ray glasses that allowed you to see any person you ever saw in their underwear at
will. How could you not?
It’s just so tempting to see if a beautiful website is built with beautiful code as well, or if it’s
beauty if only skin-deep. Code? Beautiful? Sure. After all, Code is Art. This is just HTML, so it
can’t be quite as intricate and elegant as a dynamic language, but it still bears the brush strokes
of it’s creator and there is craftsmanship abound.
It gets me to thinking, what makes beautiful code? In HTML, it really comes down to
craftsmanship. It’s all those little things added up that make the whole. Here is a list of just
some of the little things that I look for in other’s code and that I try to do myself that make for
good craftsmanship in HTML:
1 of 25 8/27/2008 6:11 PM
What Beautiful HTML Code Looks Like - CSS-Tricks http://css-tricks.com/what-beautiful-html-code-looks-like/
If each section of code is tabbed in once, the structure of the code is much more
understandable. Code that is all left-justified is horrific to read and understand.
Proper Ending Tags
You started strong, now end strong. Don’t be lazy and exclude closing tags for any element,
even if the page renders OK without them.
Hierarchy of Header Tags
Use header tags as they were designed, to create titles for sections and signify their
position in the content hierarchy.
Content, Content, Content
This is where your content belongs, so go nuts. Remember to keep your paragraphs
distinct and in <p> tags. Use lists where appropriate. Use codes like © for © symbols.
Don’t go overboard with <br /> tags, that’s sloppy formatting.
No Styling!
Your HTML should be focused on structure and content, not styling! Keep all of your
styling in your CSS, there should be no deprecated tags (e.g <font>) in site.
Including Navigation Code On All Pages (Even With Current Navigation Highlighting!)
[http://css-tricks.com/including-navigation-code-on-all-pages-even-with-current-navigation-highlighting/]
My 5 Favorite Wordpress CSS Tricks [http://css-tricks.com/my-5-favorite-wordpress-css-tricks/]
CSS-Tricks Finally Gets A Print Stylesheet [http://css-tricks.com/css-tricks-finally-gets-a-print-
stylesheet/]
Header Text Image Replacement [http://css-tricks.com/header-text-image-replacement/]
2 of 25 8/27/2008 6:11 PM
What Beautiful HTML Code Looks Like - CSS-Tricks http://css-tricks.com/what-beautiful-html-code-looks-like/
Show Pingbacks
3 of 25 8/27/2008 6:11 PM
What Beautiful HTML Code Looks Like - CSS-Tricks http://css-tricks.com/what-beautiful-html-code-looks-like/
Responses
1.
2.
Nice work!
Now whenever I write an article setting up any kind of standard, I usually find it has a
glaring typo. Today, for you, your typo is “Heiracrchy”.
~Matt
3.
4.
Very good article. I like the idea of putting an id on the body, have not thought of that
before.
I have a website im creating at the moment which has a different footer, so that could have
been handy
5.
Nice work Chris. Here’s another useful link for your readers . . .
4 of 25 8/27/2008 6:11 PM
What Beautiful HTML Code Looks Like - CSS-Tricks http://css-tricks.com/what-beautiful-html-code-looks-like/
http://www.456bereastreet.com/archive/200711/posh_plain_old_semantic_html/
6.
Within the “Semantically Clean Menu” there’s no need to surround it with a div. It’s very
common for people to surround elements with div’s for styling but the designer often
forgets that an ID can be applied directly to the element and styled accordingly.
Obviously, with complicated menu’s this may not be possible and extra span’s may also be
needed but for basic semantics I wouldn’t suggest using a div as a starting point.
Thanks
Dave
EDITORS NOTE: Since this comment, there have lots of suggestions to remove the extra
DIV from around the menu. Since I feel there are some reasons why this is a good idea, I
am not going to change the post. Due to the large number of comments on this post, I am
going to take this opportunity to thank you all for that suggestion and delete those
comments so it’s easier to read/find the other suggestions.
7.
@Graham: Nice! I think I’ll start using that phrase, that is essentially what I was getting at
in my article as well.
@Dave: You know, that’s a good point. In many situations just giving the ul a unique ID
could control everything the div could. I could think of a few scenarios you would want the
div as well (for instance, so you could use background images on both the div and ul and
get some sliding doors stuff going on with the whole menu), but for the most part, you
probably don’t need the div.
8.
I love clean code no matter which language I use - the only problem is when you have a
looming deadline and you catch yourself farting around with beautifying your code rather
than completing that important requirement !!!
5 of 25 8/27/2008 6:11 PM
What Beautiful HTML Code Looks Like - CSS-Tricks http://css-tricks.com/what-beautiful-html-code-looks-like/
9.
@paulie: That’s true, you don’t want to be missing deadlines because you are busy
rethinking how many spaces you want to use to tab in new sections of code.
However, keeping your code clean and beautiful can actually save you time in the long
run, because it is so much easier to read and find things.
10.
Basing on the code excerpt you provided on the image, I would add:
— strict DOCTYPE— semantic (non–presentational) class names— no obtrusive scripting
(input onfocus) and no inline CSS
~Wojtek
11.
You don’t need the div around your site either. You can style the element like you would a
div.
In general, I find that expressing your page with the fewest (and no fewer) elements
possible to be most preferred.
12.
Do you really need to do this? does it make a blind bit of difference from an seo
perspective?
6 of 25 8/27/2008 6:11 PM
What Beautiful HTML Code Looks Like - CSS-Tricks http://css-tricks.com/what-beautiful-html-code-looks-like/
13.
@Zach: I agree, use the exact number of elements you need to describe the content. No
more, no less. I do like wrapping all page content in a div, mostly for the centering.
@sickr: Actually, yeah, I think a major reason it is important is for SEO reasons. I am not a
SEO expert though, so I can’t completely vouch for that. The other reason is screen
readers and people who browse with CSS turned off, they need your important content at
the top, not the bottom.
14.
Don’t use XHTML unless you want IE to display in quirks mode. If you’re going to use
minimal HTML and style everything appropriately with CSS, there’s no real benefit to
going with XHTML, but there’s a big issue with IE and XHTML.
15.
Regarding the div around the menu, it’s actually not so unsemantic as you might think.
A div has very little semantic meaning, but basically it means that the contents all “go
together.” The class and ID on the div specify what it is that the contents are doing.
div[id=menu] makes perfect semantic sense. (If there are more than one, of course, it
should be div[class=menu].) If you want a heading identifying the fact that it’s a navigation
menu (probably a good idea, accessibility-wise) then it should be linked to the list by being
in the same div. Plus, it adds some styling hooks, as mentioned before.
In XHTML 2 and HTML 5, there are proposals that are more semantic than a div with an
ID or class, but at least for the time being, we’re stuck with what we have.
16.
7 of 25 8/27/2008 6:11 PM
What Beautiful HTML Code Looks Like - CSS-Tricks http://css-tricks.com/what-beautiful-html-code-looks-like/
Head:
Title is set. Stylesheets linked [...]
Um, no. You declare the character set one place, and one place only: In the
“Content-Type” HTTP header, like so “Content-Type: text/html; charset=utf-8″
No, no, no. Why would you even bother to set the character set, then, if you’re not going to
use the characters in it? Just put the © symbol directly in your code, a practice that has it
show up properly as long as you’ve set the proper charset.
Once again — good article, my comments are only meant as constructive criticism.
17.
“Regarding the div around the menu, it’s actually not so unsemantic as you might think.”
I wrote an article awhile back and noted the same thing, div is a division of content.
However that being said there are still good reasons to strip the div.
The UL already associates the list items together - if you were to have additional menu
related content with in the div it would make sense. By itself, there really is no need for
the div unless the design requires it.
18.
Happy to say that I’m using every tip listed on the site I’m currently working on. I always
try to structure projects so that I have the time and resources to write clean, semantic
code. Failing that, if a client simply is flexible on the schedule I’m almost always willing to
invest my own time in perfecting the code. At the end of the day, you want to be proud of
your work and know that you did your best. After all, who knows who’s peaking under the
covers and writing a blog post about your site. That reminds me (:shudder:), I really need
to update my own websites. Cobblers kids syndrome.
19.
8 of 25 8/27/2008 6:11 PM
What Beautiful HTML Code Looks Like - CSS-Tricks http://css-tricks.com/what-beautiful-html-code-looks-like/
All good (and it should be obvious), but the idea of “Code is Tabbed into Sections” is just
nonsense.
The page code is for the machines not humans. It shouldn’t matter if it’s tabbed, messy or
even all in one line. Actually for IE6 is sometimes better to keep lists in one line, without
line breaks.
Perhaps tabbing is good if you write all code per page by hand, but if you use CMS then
most likely you’ll not achieve all pretty formatting.
And there are always tools to hand to quickly format page source code to see “how they’ve
done it” even if the original HTML is “messy”.
20.
21.
Some good points. It’s hard to make a call on the wrapper divs without seeing what look
you’re going for. Sometimes you need that extra markup to get around the limitations of
CSS.
22.
No inline styling? I don’t want to create CSS for every wild idea I might have during a
temporary holiday rebrand, such as an ugly green DIV inside content area with a
background image. So I’m supposed to put all that into it’s own css file for ONE page? I
think not.
But as a general rule, I agree with you. That said, I think most people reading this site
9 of 25 8/27/2008 6:11 PM
What Beautiful HTML Code Looks Like - CSS-Tricks http://css-tricks.com/what-beautiful-html-code-looks-like/
23.
@smickworks: I’d said by creating separate stylesheet for just one page you loose the
benefit of having CSS in cache, but still — content should be separated from presentation,
no matter if it only does appear on a single page or is common.
24.
I have a suggestion about putting the tag before the because I heard “browsers block all
downloads when they encounters a tag. So until a script is downloaded and parsed, no
other downloads will be initiated.”
source: http://www.sitepoint.com/article/web-site-optimization-steps/4
25.
Wow!
I really appreciate everyone’s suggestions. Every one of you has had great, on-point
criticisms and suggestions and I agree with almost all of them. I hope this helps all of us
write even better code!
26.
Title should go AFTER the meta tag with the encoding, because if the title contains
non-ascii chars, you may be seriously screwed — IE can show an empty page.
10 of 25 8/27/2008 6:11 PM
What Beautiful HTML Code Looks Like - CSS-Tricks http://css-tricks.com/what-beautiful-html-code-looks-like/
27.
@Chris - what about using all the suggestions that you prefer and think is worth while to
make an updated version??
28.
29.
Very useful article, thanks especially for the body id. I’ll use this as a checklist for my
future websites.
30.
Hi everyone,
1: how should we combine PHP HTML and Javascript in one file? If I code PHP, I try to
use the MVC model and use only some loops and echo statements in the “view” pages. But
if I then also add JS to the mix, it quickly gets chaotic.
2:If you want your PHP to produce clean well indented HTML you have to code in /t and
/n by hand in your PHP. That makes your PHP less clean and readable. Because the PHP
code is more likely to produce complex problems for which I want the most clean code I
prefer to have less clean HTML.
3: A problem I bumped into recently. If you have a site where you let your users add
content and you let them use certain tags, how do you control that the tags used are also
clean?
11 of 25 8/27/2008 6:11 PM
What Beautiful HTML Code Looks Like - CSS-Tricks http://css-tricks.com/what-beautiful-html-code-looks-like/
31.
No PHP includes, jsp:includes, or any of that other rot. If you decide you don’t want to
include the content at that particular location, or at all, then guess what - you get to change
all 150 pages of your site.
No, instead, use a decorator/compositor, like sitemesh, or a mvc framework like RoR that
provides view templating for free.
Don’t include headers and footers into your page - include your page into your headers
and footers!
32.
33.
Like you, I view source of sites I visit, just to see if competitors do clean code as clean as I
can do.
34.
To clarify about IE and xhtml. IE defaults to quirks mode with an xhtml 1.1 doctype but
does not with xhtml1.0 strict.
Secondly, it’s semantic if it can be read. Having an extra div around a ul isn’t going to kill
anyone. Although, I personally wouldn’t do the extra divs though.
Lastly, tabbing the code helps other coders - html isn’t for machines only - someone may
need to go in and work with it at a later point whether in a cms our outside, it helps
immensely.
I feel for you Chris, I have the same addiction to well crafted code.
12 of 25 8/27/2008 6:11 PM
What Beautiful HTML Code Looks Like - CSS-Tricks http://css-tricks.com/what-beautiful-html-code-looks-like/
35.
I do that allot myself. Especially when I see a pretty site I tend to wonder “How pretty is it
under the skin?”.
I find it a challenge when doing dynamic sites to generate a HTML document that looks
nice with proper indentation structure and linebreaks. It’s come to a point where I just got
to face the facts that I spend too much time on it and really just need to leave it alone.
Nice article. Too bad ,however, that the very site the article is on doesn’t validate. H1
element inside an A element, missing alt attribute, unclosed P elements.
36.
@Thomas: Thanks for pointing out the validation errors. I got those cleaned up! Most of it
was trying to pack too much inside of list elements.
37.
Dave mentioned that “there’s really no need for the page-wrap div either”, I usually use
page-wrap for centering too.
And now I wonder if there is another method for that? Or what does he mean by saying
that?
38.
13 of 25 8/27/2008 6:11 PM
What Beautiful HTML Code Looks Like - CSS-Tricks http://css-tricks.com/what-beautiful-html-code-looks-like/
Nice list!
I wonder if there is a tool that can check my website and give me hints how to improve it.
Or is there even a tool that helps transforming a table based design into a clean div design?
39.
@Inwit,
Yes there is such a tool, the human brain and its motivation for standards and clean code
Seriously: I think it is much better to redesign/refactor code by hand than to let software
do it.
40.
I have the same kind of addiction, though I more often do a CTRL+SHIFT+S in firebug.
One could argue that a semantically clean menu doesn’t need a wrapped around it.
41.
This is a very nice article, a few new tips for me and a few good ideas I sometimes forget.
One thing that someone told me to do that I LOVE now is to put a comment at the end of
my divs that makes it clear which div it belonged to
42.
14 of 25 8/27/2008 6:11 PM
What Beautiful HTML Code Looks Like - CSS-Tricks http://css-tricks.com/what-beautiful-html-code-looks-like/
@Inwit,
If you need some code checked, you can get someone to do it for you.
43.
Hi,
Good advices, but i’d rather (and I do it) put a class on the body, instead of an ID.
The body tag is already unique, so body.yourclass will be unique, no need for an ID.
Plus, the ID you choose for your body could conflict with an ID used in the entire page.
To conclude, we could also say that in *one* website, the different pages bodies are the
same “object”. Giving them an ID would mean “each body is a different entity”, which is
not true : same entity but with little (or big) differences, so the class is semanticaly better,
to my opinion.
My 2 cents…
44.
No need to wrap all your content in a div to set widths. You can do that with the body
element. Only if you need to give the same presentational flourish to IE5 or older users
would you need the extraneous div.
45.
@John Lascurettes:
While you’re technically right, in regards to not needing a wrapping div, it’s still good to do
for several reasons.
Just one example: planning for the future. The beauty of CSS is that you can markup a
document semantically, and the presentation layer is kept separate. in an ideal world, that
means you can markup a page once, and design and re-design to your heart’s content. You
might not need a wrapping div NOW, but it doesn’t hurt, it adds more control, and you
might change your mind.
15 of 25 8/27/2008 6:11 PM
What Beautiful HTML Code Looks Like - CSS-Tricks http://css-tricks.com/what-beautiful-html-code-looks-like/
46.
Hey, i love the article.. I was wondering if you could show me a HTML of a text box. I need
it for somthing, but of course i don’t know what it looks like.. Thanks!
-Ashley
47.
“Keeping your code clean and beautiful can actually save you time in the long run,
because it is so much easier to read and find things.
That’s SO TRUE! I’m just learning my way around web design, but I learned that one
mighty fast. Plus I was able to have a really good laugh over some of the gobbledegook I
found when I cleaned out my templates. :):)
48.
While the HTML code is clean, it isn’t anything special. If you’re design a typical site like
this one with the typical header, menu bar, search box, sidebars, content area, and footer.
It could work. But when you design a business site with many panels of contents, I doubt
your clean HTML code would work.
49.
I live by those.
16 of 25 8/27/2008 6:11 PM
What Beautiful HTML Code Looks Like - CSS-Tricks http://css-tricks.com/what-beautiful-html-code-looks-like/
50.
@sV : Commenting HTML? ROFL! If you want to loose precious bandwitdth and slow
down your clients, yep, definitely the way to go!
Comments are OK for server side scripting or source code to be compiled while it’s BAD to
put it in your HTML or CSS code.
And it is possible to keep a huge website clean. In fact you must do it if you don’t want it to
collapse after 6 months of patching.
“Clean” doesn’t meaning “basic”, you can produce clean complex code.
51.
Thanks for this guide. i’ll clean my site html code right now!
52.
Thanks.
53.
Good example how to code in HTML. Thanks. I only add that title tag are very important
and I agree with Chris Coyier that title tag should go after meta tags.
17 of 25 8/27/2008 6:11 PM
What Beautiful HTML Code Looks Like - CSS-Tricks http://css-tricks.com/what-beautiful-html-code-looks-like/
54.
55.
I don’t agree with all of these. A lot of these features are used to force your HTML/CSS to
over-reach itself (e.g. wrapping up a page in a DIV serves no semantic purpose at all - it
just helps designers achieve graphical/typographical effects). Similarly, the point of
putting a menu in a list is that it is just that - a list; not so you can add rounded corners to
your tabs.
Also, isn’t it a better idea to keep your headers logically organised and styled consistently?
Why change your level 2 headings from page to page - it just confuses the user.
Beautiful code should be well structured and marked up semantically. That is what makes
it easy to read.
56.
57.
How exactly does changing the H2 tag from page to page confuse the user? That don’t see
the tags, so who cares if it’s H2, H4 or .sometext? And if the only way to create a desired
site presentation is to wrap it in a DIV, what’s it hurt?
58.
18 of 25 8/27/2008 6:11 PM
What Beautiful HTML Code Looks Like - CSS-Tricks http://css-tricks.com/what-beautiful-html-code-looks-like/
59.
60.
You do have some nice clean html and some great recommendations. I would argue that
you left out one more thing. The html should also be minimized.
61.
I hate to check all sites on 4 different browsers. The best one is probably Opera. I only
check the sites once in a while with Opera and they mostly look great on it;-)
Opera ROCKS_
62.
I actually would disagree with nearly everything in this article. It misses the point entirely.
The point of HTML css and other related technologies is to produce the website and then
usually keep the website up to date. The point of HTML css and so on is not the end in
itself. People don’t pay you to write code they pay you to solve a problem. Thus they want
the problem solved without generating new problems. So creating the cleanest simplest
code possible that does exactly the work required is what most people want. So in reading
the above article I would ask the scientific questions of why and prove it for each of the
points.
19 of 25 8/27/2008 6:11 PM
What Beautiful HTML Code Looks Like - CSS-Tricks http://css-tricks.com/what-beautiful-html-code-looks-like/
# Body IDed
Why? What does this accomplish as compared to not using it. Personally I can think of
specific reasons to id the body such as if you are going to dynamically alter it. But
otherwise you end up with code that might do nothing.
# Semantically Clean Menu
Why? If the menu is likely to change then this might be a good rule. But depending on the
menu structure and page design this might not be a good idea.
# Main DIV for all Page Content
Why. This might be code for the sake of coding. What problem does this solve?
# Important Content First
Why? SEO maybe? Western people read left to right and top to bottom. Thus in a
somewhat standard 3 column layout I would expect Header, left, center, right, footer to be
the code order anything else and I am hunting around.
My rule is to use the right tool for the job not my favorite tool for the job. The right tool
should result in the fewest number of small simple files. A good example of where I have
seen bad use of things like CSS is where you have say 30 fundamentally different pages in
a site and all their css is clumped into one file. Just as bad would be to have the css broken
up in 30 separate files.
CSS in a separate file serves three purposes. A common repository for common code,
potentially a single place to reformat the entire site and to speed the loading of the site as
the the css file will be 304′d. So if the css is not repeated throughout the site then that only
20 of 25 8/27/2008 6:11 PM
What Beautiful HTML Code Looks Like - CSS-Tricks http://css-tricks.com/what-beautiful-html-code-looks-like/
leaves speeding up page load times. So if you are facing a common situation of copying
some CSS into a CSS file that is used in only one place on a page infrequently loaded why
is it in the css file? Why not go so far as to put the CSS into a style attribute right where it
gets used? Css purists will get all wound up over this one but to me this reeks of religion
not fact. In good programming you want to keep in mind that real people will read this
code. If a person is in making changes to a page and they have to jump back and fourth to
a css file and hunt for some tags modifiers then have you served the purposes of your
client or have you served the purposes of some rules that someone made up in their head?
If the style modifiers are right where you need to make your changes then you have made
everything easier, simpler, and thus cheaper.
Personally I would fire any programmers that I found wasting my money on “proper”
formatting that only served to complicate and obfuscate the code and thus miss the whole
point as to why they were hired in the first place; Solving problems.
Much more important code rules that I impose are like: Use English in code. ftr_l.png is
bad where footer_left.png is better.
63.
@Robert:
DOCTYPE: Leaving it out triggers quirks mode with many odd behaviours making it hard
to produse cross browser implementations as quick mode in other browsers tried to
implement IE’s many quicks. And this makes it all a guessing game.
And where have you heard that W3C don’t want people to use a doctype with DTD relating
to the w3c site? There’s no browser that loads the DTD of HTML files, so it got no grounds
for that statement.
21 of 25 8/27/2008 6:11 PM
What Beautiful HTML Code Looks Like - CSS-Tricks http://css-tricks.com/what-beautiful-html-code-looks-like/
# No Styling!
Tables for layout and font tags are the wrong tools, period. It’s all about separating the
layout from the content.
By the whole it appears that you see websites as a purely visual matter. Your arguments
doesn’t accommodate how to present the document to different media, such as screen
readers, handheld devices and print. Leaving all the layout into separate CSS files allows
you to serve a different CSS to these different medias.
If a site has 30 pages that need 30 different stylesheets then the real question is why does
it require 30 different stylesheet? Why is there no consistency?
“Personally I would fire any programmers that I found wasting my money on “proper”
formatting that only served to complicate and obfuscate the code and thus miss the whole
point as to why they were hired in the first place; Solving problems.”
CSS doesn’t complicate or obfuscate. That would be solely due to the person writing the
codes.
Some of your questions are valid if you look at the articles as a spesific example. Several of
the DIVs and IDs might not be needed. It’d all depend on each site and the markup should
be adapted to each case.
However, many of you questions regarding semantics and separating layout from content
doesn’t hold water. Have you read up on the benefits of web semantics? The value of
separating content, layout and behaviour?
64.
Thomas, don’t loose your energy with Robert, we obviously don’t live in the same world
At best it’s a troll, at worst he really believe what he is saying…
65.
“In general, I find that expressing your page with the fewest (and no fewer) elements
possible to be most preferred.”
Yes - with a caveat. Sometimes it’s useful to add an extra div in places where it might be
useful as a styling hook at a later date. A couple of times I’ve cursed myself for not putting
any spare styling hooks in when I’ve wanted to tweak something, and have had to either
not bother, or go through every page adding them. A few spare divs round key chunks of
the page won’t hurt, and could save you a lot of time in the long run.
22 of 25 8/27/2008 6:11 PM
What Beautiful HTML Code Looks Like - CSS-Tricks http://css-tricks.com/what-beautiful-html-code-looks-like/
“No, no, no. Why would you even bother to set the character set, then, if you’re not going
to use the characters in it? Just put the © symbol directly in your code, a practice that has
it show up properly as long as you’ve set the proper charset.”
No, no, no. Do you know what charset your text editor is using? I don’t - it could be
Windows-1252 for all I know. Typing UTF-8 into the third line of a plain text document
doesn’t magically save that document in UTF-8! I’d rather stay safe and use the character
encoding, and guarantee that it will come out right in every browser.
66.
This summary is helpful to improve the own source code of XHTML and CSS.
I will show the image later, but i find some interesting ideas already.
Ralph
67.
Great article, but can you please tell me how to go about getting the ‘important content’
first. I use php includes to manage my navigation and footer, and when seen in the html
source, the navigation part is first, how do I get the ‘content’ read first?
Thanks
68.
Hey, if you use Haml for all your HTML needs, you’re already half way there!
69.
Very nice article, however I might suggest another tip to your list: use the right graphic file
format for the right image type.
23 of 25 8/27/2008 6:11 PM
What Beautiful HTML Code Looks Like - CSS-Tricks http://css-tricks.com/what-beautiful-html-code-looks-like/
Your “CleanCode” image should obviously be PNG (or GIF), NOT JPEG. JPEG is for
photographic content, and your CleanCode image is clearly not a photo!
I did some tests, and you should be able to make an 8-bit PNG with 32 colors at around
100-125 KiB, with a better end result than your 896 KiB JPEG file. The same could
probably be done with the PDF if you embed a PNG instead of a JPEG.
70.
For example, view source the HTML for this site i’ve just finished developing:
http://www.mainstaystudent.co.uk
Despite running from a MYSQL backend and generated using PHP, I still maintain decent
html structure.
71.
72.
Very good article! I also had never thought of using an id on the body
73.
24 of 25 8/27/2008 6:11 PM
What Beautiful HTML Code Looks Like - CSS-Tricks http://css-tricks.com/what-beautiful-html-code-looks-like/
Thank you for visiting CSS-Tricks! I'm glad you found an article useful enough to print out!
Remember to visit css-tricks.com often for more fresh content.
25 of 25 8/27/2008 6:11 PM