Sie sind auf Seite 1von 3

3.

02 HTML Code Examples


I will edit and add to this code as you tell me what does and
does not work.

Basic Tags
<html> </html> Creates an HTML document
<head> </head> Sets off the title and other information that isn't displayed on the
webpage itself
<body> </body> Sets off the visible portion of the document
Header Tags
<title></title> Puts the name of the document in the title bar
<meta /> Provides information about the page for search engines and browsers.
The <meta http-equiv="Content-Type" content="text/html; charset=ISO-88591" /> is required.
<meta name=author content=authors name /> - provides a search engine
with the authors name.
<meta name=description content=Description /> - provides a description of
the webpage that will be displayed when a search engine shows the pages URL
in a hit list.
<meta name=keywords content=list of keywords /> - provides a list of words
that a search engine should associate with the page.
Example
<head>
<meta name=keywords content= this is where you will type in your keywords that are
appropriate to your website>
<!--This is a Comment tag-->

Does not show up on the webapge

Text Tags
<h1> </h1> Creates the largest headline
<h6> </h6> Creates the smallest headline
<b> </b> Creates bold text
<i> </i> Creates italic text
<font face=Arial> changes font to Arial
<h1> <font face=Times New Roman> </h1>

Links
<a href="URL">George Washington</a> Creates a hyperlink
<a href="mailto:EMAIL"></a> Creates a mailto link
Formatting
<p> </p> Creates a new paragraph same as double spacing leaves a blank line
<br /> Inserts a line break same as single spacing does not leave a blank line
<blockquote> </blockquote> Indents text from both sides
<ol> </ol> Creates a numbered list
<li> </li> Precedes each list item, and adds a number
<ul> </ul> Creates a bulleted list
<center> Centers text or image
<body bgcolor=000FFF>
<font color=FFF066>
Graphical Elements
<img src="filename.???" alt="alternate text" height="number"
width="number" /> Adds an image
<hr /> Inserts a horizontal rule
<hr color=000000>
<hr width=70% color=fff380 size =10>
<object> </object> Inserts an embedded object such as an audio or video clip.
<object width="320" height="260> </object> Sets size of object.
<embed src=cat.swf height=50 width=800> embeds a Flash movie such as your
banner ad and makes the size more like a banner shape
<embed src=Natalie.mp4> embeds a MPEG file created from the Flip camera.
<marquee behavior=scroll direction=right><img src=logo.gif width=300
height=200/> inserts a scrolling marquee
<table> inserts table
<table bgcolor=00ff00 border=10 cellpadding=20 cellspacing=20> inserts color and
border
<th> table header
<tr> table row
<td> table definition
</table>

Create Multiple page website


To create a multiple page website, you will need to link each page together with a
hperlink
(a href)
Your homepage can be called and saved as Index.html. Your second
page can be called and saved as Products.html. Your code to link the two pages might
look like this:
<a href=index.html>Home Page</a>
<a href=products.html>Products Page</a>
page

This code will link to your home page


This code will link to your products

A list of W3C HTML tags can be found online at


http://www.w3schools.com/tags/default.asp

Das könnte Ihnen auch gefallen