StylizedWeb

Subscribe to our updates:

A Design, WordPress and Tutorials Blog.

Dedicated to helping you learn the art and science of the web.

Learn CSS and xHTML

Quick note before you continue, this article is just for beginners and people who would like to start learning CSS and xHTML. As i was reading blogs and other people comments i realized that many of them don't know much about CSS and xHTML coding, just regular blog readers but they would like to learn it.

So to learn CSS and xHTML you would need something to start with and i would like to give you master CSS and strict xHTML code instead of plain long texts of explanations.

xHTML
 
 
<!--
/*<![CDATA[*/
@import url(/css/style.css) all;
/*]]>
*/
-->
<div id="container">
<div id="header">
<h1>Title of page goes here</h1>
<h2>Subtitle of page goes here</h2>
<h3>Skip to content</h3>
</div>
 
<!-- end header div -->
<div id="nav">
<ul>
<li><a href="#">Link #1</a></li>
<li><a href="#">Link #2</a></li>
<li><a href="#">Link #3</a></li>
</ul>
<ul id="breadcrumbs">
<li><a href="#">Home</a></li>
<li><a href="#">sub directory</a></li>
<li><a href="#">current page</a></li>
</ul>
</div>
 
<!-- end nav div -->
<div id="main">
<h3>Title of article goes here?</h3>
 
Begin article here
<ul id="sidebar">
<li><a href="#">Sidebar Link #1</a></li>
<li><a href="#">Sidebar Link #2</a></li>
<li><a href="#">Sidebar Link #3</a></li>
</ul>
</div>
 
<!-- end main div -->
<div id="footer">
 
©2XXX company name here. Creative Commons link/ your own link</div>
 
<!-- end footer div --></div>
 
<!-- end container div -->
 
CSS
 
/***** Global Settings *****/
 
html, body {
border:0;
margin:0;
padding:0;
}
 
body {
font:100%/1.25 Arial, Helvetica, sans-serif;
}
 
/***** Headings *****/
 
h1, h2, h3, h4, h5, h6 {
margin:0;
padding:0;
font-weight:normal;
}
 
h1 {
padding:30px 0 25px 0;
letter-spacing:-1px;
font-size:2em;
}
 
h2 {
padding:20px 0;
letter-spacing:-1px;
font-size:1.5em;
}
 
h3 {
font-size:1em;
font-weight:bold;
}
 
/***** Common Formatting *****/
 
p, ul, ol {
margin:0;
padding:0 0 1.25em 0;
}
 
ul, ol {
padding:0 0 1.25em 2.5em;
}
 
blockquote {
margin:1.25em;
padding:1.25em 1.25em 0 1.25em;
}
 
small {
font-size:0.85em;
}
 
img {
border:0;
}
 
sup {
position:relative;
bottom:0.3em;
vertical-align:baseline;
}
 
sub {
position:relative;
bottom:-0.2em;
vertical-align:baseline;
}
 
acronym, abbr {
cursor:help;
letter-spacing:1px;
border-bottom:1px dashed;
}
 
/***** Links *****/
 
a,
a:link,
a:visited,
a:hover {
text-decoration:underline;
}
 
/***** Forms *****/
 
form {
margin:0;
padding:0;
display:inline;
}
 
input, select, textarea {
font:1em Arial, Helvetica, sans-serif;
}
 
textarea {
width:100%;
line-height:1.25;
}
 
label {
cursor:pointer;
}
 
/***** Tables *****/
 
table {
border:0;
margin:0 0 1.25em 0;
padding:0;
}
 
table tr td {
padding:2px;
}
 
/***** Wrapper *****/
 
#wrap {
width:960px;
margin:0 auto;
}
 
/***** Global Classes *****/
 
.clear         { clear:both; }
.float-left    { float:left; }
.float-right   { float:right; }
 
.text-left     { text-align:left; }
.text-right    { text-align:right; }
.text-center   { text-align:center; }
.text-justify  { text-align:justify; }
 
.bold          { font-weight:bold; }
.italic        { font-style:italic; }
.underline     { border-bottom:1px solid; }
.highlight     { background:#ffc; }
 
.wrap          { width:960px;margin:0 auto; }
 
.img-left      { float:left;margin:4px 10px 4px 0; }
.img-right     { float:right;margin:4px 0 4px 10px; }
 
.nopadding     { padding:0; }
.noindent      { margin-left:0;padding-left:0; }
.nobullet      { list-style:none;list-style-image:none; }
 
Example

And here is one really good example of simple template, designed by Six Shooter Media named Basic

Basic

Demo
View demo page

Download
download Basic example Download Basic example (Downloaded 1427 times)

If this post was helpful contribute to StylizedWeb by registering domains

Leave a comment on Stylized Web Have some feedback? Leave a comment

17 Comments So Far

  1. By MAJDA posted on February 16, 2008 at 3:51 pm

    :) thanks!

  2. Cool! thanks for sharing

  3. By Dejan posted on February 16, 2008 at 8:05 pm

    You are welcome ;)

  4. thanks!

  5. Do you think that for beginners this is still a little too complicated?

  6. By Dejan posted on February 18, 2008 at 9:30 am

    @ Jermayn Parker
    I’m not sure, that’s why i need your opinion.
    I was thinking it would be good if beginners have basic structure to always start with, and some basic example they can look up with.

    There are plenty of recourses online for all tags etc, so i didn’t want to duplicate that content

  7. By 区区- -!! posted on March 7, 2008 at 2:22 am

    ^_^“Thanks for sharing!

  8. By Reggie posted on April 7, 2008 at 10:00 pm

    Thanks for sharing !

  9. By preety posted on April 9, 2008 at 7:27 am

    its is really stunning it,s nice.

  10. I’m only just learning this stuff, and I have to say that starting with a basic template is the best way to learn. Books are helpful, but seeing case studies of layout is missing from most every publication on the subject.

    Thanks.

    -your 600th download.

  11. Thanks for sharing! :)

  12. Pingback: StylizedWeb, web trends and tutorials | blog.bouctoubou.com - path ton chemin / Graphiste - Intégrateur XHTML / CSS

  13. Thanks for share. It’s useful for me !

  14. %100 Doğal ve hiç bir yan etkisi olmayan Uzamax’ı keşfedin
    UZAMAX içeriğinde mineral ve vitaminler barındıran, doğal bitkielerden üretilmiş gıda desteğidir. İçeriğinde herhangi bir kimyasal ürün bulunmamakla birlikte tamamen doğal kurutulmuş bitkisel bir karışımdır. Sadece birkaç aylık kullanım kürü sonrasında bile uzamax’ın etkisini hissedeceksiniz.

    Uzamax kullanarak doğal yollarla bünyenize gerekli olan tüm besin, vitamin ve mineralleri vücudunuza almanızı sağlar.izlanda yosun hapı

  15. By ying posted on August 29, 2011 at 10:53 am
  16. goood way for learning

  17. Greetings! I’ve been following your site for a long time now and finally got the bravery to go ahead and give you a shout out from Humble Texas! Just wanted to say keep up the great job!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>