XHTML
Yoy need to know basic HTML for this tutorial...I mean, what tags like <div>, <table>, etc. are. If not, go to
http://www.w3schools.com/html and study.
Alright. Here's how you can create your own web site without any editor. Just notepad. First, you need a doctype:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
Then, type:
Code:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>My Web Site</title>
<link rel="author" title="Chirea Mircea Mark Aurel" href="mailto:chireamircea@yahoo.com" />
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=ISO-8859-1" />
<meta http-equiv="Content-Language" content="en" />
<meta name="language" content="English" />
<style type="text/css">
/* Nothing here. Replace with CSS */
</style>
</head>
The <meta http-equiv="Content-Type" content="*; *" /> tag defines the content type of the page. THe first star is the type of the page, in this case it's application/xhtml+xml (as required by xhtml), and the second star, id the encoding,. This can be anything.
The <link> tag defines an external file (css, rss) or info for web developer browsers or voice browsers. Please leave the link tag with my name, as I like to press the SPAM button
The "Content-Language" meta tag is used to say the language of the content (only 2 letters, 4 if en-us, etc...). If you change it's value, change the vaue of the attribute xml:lang from the <html> tag. The <meta name="language" content="English" /> tag is used by some old browsers and search engine crawlers. It's good to use this too, as you can supply the full name of the language, IN IT'S OWN WORD (Like if you are writing in Romanian, you can type 'Romana'...don't ask).
Now, let's get on the body. I'll use tables for design, as i'm, too lazy to make some divisions and use CSS to make them float (as on my site). Type:
Code:
<body>
<table summary="The whole content">
<tr>
<td class="header">
<h1>Welcome to my site!</h1>
</td>
<tr>
<td class="menu">
<div id="top">
Something...
Something...
Something...
Something...
Something...
</p>
</div>
<div>
<a href="http://www.something.com">
[img]skyscraper.png[/img]
</a>
</div>
</td>
<td class="text">
<h2>Content</h2>
Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. </p>
Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. </p>
Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. </p>
Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. </p>
</td>
<td class="ads">
<div id="top">
Something...
Something...
Something...
Something...
Something...
Something...
Something...
Something...
Something...
Something...
</p>
</div>
<div>
<a href="http://www.something.com">
[img]skyscraper2.png[/img]
</a>
</div>
</td>
</tr>
</table>
</body>
</html>
Alright. This is a basic page. You can test it, but the skyscrapers wil never showi f u don't have some. Now let's get on CSS. The IDs and CLASSes will be useful here.
CSS
Alright, here's the CSS part. Remember that in the <head> is a tag like this:
Code:
<style type="text/css">
/* Nothing here. Replace with CSS */
</style>
???
Well, we will replace it's content with CSS. Let's set a color, the align direction, the apdding, spacing and border for all the elements:
Code:
* {color: red;text-align: center;padding: 0px;border-spacing: 0px;border: 0px}
Now, let's make a background color and more for the divisions with the menu, ads and for the <td> with the content. If it's id="*" then use #, if is class="*" then use . (dot):
Code:
.menu {background-color: green}
#top {vertical-align: top}
.ads {background-color: green}
.text {background-color: blue;vertica;-align: top}
Now, I'm tired. I won't get through all the CSS. GO here:
http://www.w3schools.com/css.
Now the whole code should look like this:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>My Web Site</title>
<link rel="author" title="Chirea Mircea Mark Aurel" href="mailto:chireamircea@yahoo.com" />
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=ISO-8859-1" />
<meta http-equiv="Content-Language" content="en" />
<meta name="language" content="English" />
<style type="text/css">
* {color: red;text-align: center;padding: 0px;border-spacing: 0px;border: 0px}
.menu {background-color: green}
#top {vertical-align: top}
.ads {background-color: green}
.text {background-color: blue;vertica;-align: top}
</style>
</head>
<body>
<table summary="The whole content">
<tr>
<td class="header">
<h1>Welcome to my site!</h1>
</td>
<tr>
<td class="menu">
<div id="top">
Something...
Something...
Something...
Something...
Something...
</p>
</div>
<div>
<a href="http://www.something.com">
[img]skyscraper.png[/img]
</a>
</div>
</td>
<td class="text">
<h2>Content</h2>
Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. </p>
Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. </p>
Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. </p>
Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. Text here. </p>
</td>
<td class="ads">
<div id="top">
Something...
Something...
Something...
Something...
Something...
Something...
Something...
Something...
Something...
Something...
</p>
</div>
<div>
<a href="http://www.something.com">
[img]skyscraper2.png[/img]
</a>
</div>
</td>
</tr>
</table>
</body>
</html>
If you want, remove the comments around the <link> tag, include the contents of <style> in a file & save is as style.css. Now, delete the <style> tag. It's better to use external file, because u can save bandwidth and time.
Well, I hope you can learn something from this. If there are some errors, don't blame me, I'm tired.