Some really basic HTML things

Posted by Jeff Kupperman Fri, 15 Sep 2006 20:13:28 GMT

The basic structure of an HTML page:

<html>

<head>

Stuff like the title, addresses for stylesheet or javascript files and other "meta-information" goes in the head.

</head>

<body>

The content of the site -- the stuff users see, plus markup tags that organize the content and sometimes show how to display it, go in the body.

</body>

</html>

Now, here are some other basic tags:

<title> Defines the title that appears at the top of the browser window.
Example: <title>Hello, World!</title>

<h1> <h2> <h3> etc. Headlines of various sizes. h1 is the largest.
Example: <h2>This is my funky web site.</h2>

<p> Paragraph Example:
<p>Yo!</p>

<br> Single line break.

<a href="..."> Anchor (link) to a file or url
Example:
<a href="http://www.gotmilk.com">Milk</a>

Here's an unordered (bullet point) list:
<ol>
<li>One</li>
<li>Two</li>
<li>Three</li>
<li>Four</li>
</ol>

What about stylesheets? Well, here's a very basic one.

body {

background: #c0c0c0; color: #000000; font-family: Helvetica, Arial, Geneva, sans-serif;

} a:hover {

font-weight: bold; font-decoration: none; color: pink;

}

Save it in a folder called "stylesheets," and name it something descriptive, like "style.css".

Then in your html code, put something like this in the head:

<link href="/your_folder/stylesheets/styles.css" media="all" rel="Stylesheet" type="text/css" />

Leave a comment, View comments, View trackbacks

Your Comments.

Leave your own response

Spread the word.

Jeff Kupperman supports RSS (Real Simple Syndication), and Trackbacks from other blogs.

RSS feed for this post Trackback URI

Your Reply

Comment Form.

Fields denoted with a "*" are required.

You may also like to leave your email or website.