Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions
 Discussion Forums
 HTML, XML, JavaScript...
 Software Reviews
 Editors,Others...
 Top100
 JavaScript Tutorials, ...
 Tutorials
 ASP, CSS, Databases...
 Discussion List
 FAQ, Roundup, Configure ...
 Authoring
 HTML, JavaScript, CSS...
 Design
 Layout, Navigation,...
 Graphics
 Tools, Colors, Images...
 Software
 Browsers, Editors, XML...
 Internet
 Domains, E-Commerce, ...
 WDVL Resources
  Intermdiate, Tutorials,...
 WDVL
 Discussion Lists, Top 100,...
 Technology Jobs

PDAs
PC Notebooks
Printers
Monitors


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us
KVM Switch over IP
Compare Prices
Promotional Golf
Imprinted Promotions
Home Improvement
Memory
Data Center Solutions
KVM over IP
Laptops
Computer Deals
Auto Insurance Quote
Disney World Tickets
Laptop Batteries
Car Donations

Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


  Generate Revenue Through IT Using Business Service Management
Sponsored by HP
Making sure that your business applications are available to their end users is an important part of running your business smoothly. Business operations have evolved to where IT must now broaden its focus to help the company attract, retain and grow customer relationships and increase customer satisfaction. Business service management (BSM) helps lay the foundation by managing services in dynamic support of business requirements. »
 
  Managing the Modern Network
Sponsored by HP
Networks are more than vehicles to transport e-mail and Web pages. In a global economy where information crosses the globe in an instant, and where Web-based applications power business, it's more important than ever to ensure your network is safe from threats and optimized to deliver the data your business needs. »
 
  Storage Networking 2, Configuration and Planning
Sponsored by HP
In Part 1, we discussed storage area networks (SANs) and fibre channel. In Part 2, delve into best practices and cover the general concepts you must know before configuring SAN-attached storage. The most critical, sometimes tedious, part of setting up a SAN is configuring each individual disk array. This guide examines configurations for SAN-attached servers and disk arrays, and also includes a look at the future of IP storage. »
 
  Is Your Disaster Recovery Plan Good Enough? Get Disaster Recovery Right
Sponsored by HP
Preparing for a disaster is more often than not part of the storage planning process, and without question it is one of the most difficult task, since it includes local hardware and software, networking equipment, and a test plan to ensure that you can recover from the disaster. Learn how to put your organization on the proper disaster recovery plan, now. »
 
Top 10 Articles
  1. Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions
  2. JavaScript Tutorial for Programmers
  3. Design
  4. JavaScript Tutorial for Programmers - Objects
  5. JavaScript Tutorial for Programmers - JavaScript Grammar
  6. JavaScript Tutorial for Programmers - Versions of JavaScript
  7. Cascading Style Sheets
  8. JavaScript Tutorial for Programmers - Embedding JavaScript
  9. JavaScript Tutorial for Programmers - Functions
  10. Authoring JavaScript
Domain Name Lookup
Search to find the availability of a domain name. Just enter the complete domain name with extension (.com, .net, .edu)

Introduction to HTML

This is a quick introduction to HTML, with many links to further information. Those links which are for HTML elements lead to pages which have further links, often into the HTML 4.0 Specification, W3C Proposed Recommendation.

Background

One of the original design goals of HTML was to be device independent. That is, it was to be used on a variety of computer systems without change. Accordingly, it was designed to be a language to describe document structure, rather than document presentation. So the basic HTML elements specify such things as headings, titles, and paragraphs - but not margins and fonts. It was left up to the browser on any specific system to take care of rendering the document in whatever way the browser author thought most suitable.

This was appropriate for the original target audience - scientific researchers who were far more interested in what was in a document, than how it appeared. But the WWW concept rapidly became very popular and other communities - especially the 'commercial' people - became interested in it. And in the commercial world, image is very important. If your documents are going to be seen by thousands or millions of people, they had better look good. But the original HTML offered very little support for layout and presentation, so the demand grew for extensions. Various browser manufacturers have introduced new HTML elements oriented towards presentation issues - notably Netscape - and some of these have been adopted into the HTML standards proposals.

Putting presentation instructions directly into documents goes against the original device-independence goal of HTML, and makes it hard to change the presentation later. The correct solution, called style sheets, has been known from before the beginning of the WWW project. Soon after its formation in mid '94, the W3C published the first draft of a concrete proposal, and early implementations were pioneered by the Arena and emacs-w3 browsers in the beginning of '95. IIRC, Navipress, Panorama, and maybe a few other commercial browser/editor tools also had some style sheet support at around the same time. The first 'mass-market' browser to adopt the stylesheet approach was MSIE, about a year later. While you can most certainly stretch the features of HTML to provide useful layout and presentation, the trend is going to be towards moving that aspect into style sheets.

Elements, Tags, and Attributes

Tags specify structural elements in a document, such as headings:
<h2>	Tags and Attributes	</h2>
Tags begin with a left-angle bracket < and end with a right-angle bracket >. The first word between the angle brackets is the tag's name. Any further words and characters are the attributes, e.g. align=right.

A tag is therefore the basic 'item', and an attribute is some extra detail such as how to align the content. An element comprises three parts: a start tag, content, and an end tag. Most tags possess 'closing tags' such as </h2> which mark the place where the effect of the 'opening' tag should stop.

Tags are case-insensitive. You can write them in small letters, big letters, or any mixture. A common convention is to write them in caps so they stand out from the rest of the document.

Tags should nest properly: if you want for example to make a part of the header in italics:

<h2>
	Tags <i>and</i> Attributes
</h2>

Also, HTML documents are free-format - you can use spaces and tabs anyhow you like, and break lines anywhere. White space and line breaks will not affect the document appearance in a browser except when used inside certain special tags which we'll describe later. Some people find HTML can be hard to read. This need not be so if it's written tidily. My own preference is to indent the text by one tab, so that the source has a left margin. Structural tags can then be placed in the margin, and it's easy to read the source. Look at the source of this page to see what I mean.

Browsers allow a great deal of flexibility about which tags you need to put into a web page. If you are designing your pages for only one browser that may be fine, but as soon as you want to support several browsers then you might want to look into validation, which is the process of checking HTML documents against the standards.

Document Structure

An HTML document consists of two main parts: the Head, and the Body. The basic document structure is
<HTML>
<Head> ... </Head>
<Body> ... </Body>
</HTML>
The Head contains information about the document, such as links to pages that could be preloaded; and the Body contains the document to be displayed. We won't say much about the Head here; it's covered in detail elsewhere. The main Head element you need to know about is the <TITLE> tag. Every document should have a title - it appears as a 'label' on the browser window, and when a user bookmarks it or looks in their history list - it's the text they'll see. Take care to make the title a good meaningful one. "Introduction" isn't much help if the user can't remember what was being introduced.
<Title>A Basic Introduction to HTML</Title>
Another useful Head tag is the <META> tag if you want to optimise your pages for search engines. See How in the Web will They Find Me ? for more on this.

Here's a slightly more realistic HTML document:

1:<HTML>
2:<Head>
3:  <Title>A Simple Document</Title>
4:  <Meta Name	= "Keywords"
5:	Content	= "Hypertext">
6:</Head>
7:<Body>
8:... This stuff is
	what the user sees ...
9:</Body>
10:</HTML>

The numbers and colons are not part of the HTML file, but serve to associate the following comments with the lines above:

  1. Declares this to be an HTML document.
  2. The Head contains items that are about the document.
  3. The title used in the browser title bar, hotlists, listings, etc.
  4. Meta tags can be used to add information not already specified in the HTML/HTTP system.
  5. Some search engines make use of these keywords, as well as those in the Body.
  6. Closes the Head.
  7. Body contains the document's displayable content.
  8. Text markup commands. View this document source for examples..
  9. Closes the Body.
  10. Closes the HTML.

HTML also supports interactive forms, "hotspots" in pictures, more versatile formatting choices and styles, and formatted lists, as well as several other improvements, such as an e-mail URL, so hyperlinks can be made to send e-mail mechanically. For example, choosing an e-mail address in a portion of hypertext opens a mail application, ready to send e-mail to that address. Now we'll move on to Body tags. This is where the action is..

Headers

The line just above was a header, i.e. a title for a new section of the document. There are 6 headers: H1, H2, H3, H4, H5, and H6. H1 is the "main" header, usually used once at the top of the document. H6 is the "smallest" header and is rarely used, though it's often abused to make small bold text (use the FONT tag or style sheets instead).

One of the original philosophies about HTML was that it should be designed for software tools to extract useful information from HTML documents. The header tags were supposed to be useful for generating a 'table of contents'.

Anchors (Links)

The fundamental feature of the WWW that makes it so powerful is of course, hypertext links. The tag that creates those links is called the anchor tag (A). It has one commonly used attribute: HREF, which specifies the URL of the target document.

Images

Graphics Images have made a profound difference in the way the web looks. Probably there would not have been the incredible explosion of interest in it if inline images had not been added..
<Img	src	= "/Icons/graphics.gif">
The above example shows the simplest way to make an inline image. You can wrap it inside anchor tags and then it will be a clickable image:
<a	href	= "../../Graphics/">
<Img	src	= "/Icons/graphics.gif"></a>
But it's a good idea to specify the image dimensions (allows the browser to lay out the page sooner) and what to do if the browser doesn't have image support or if the user has image loading turned off.
<a	href	= "../../Graphics/">
<Img	src	= "/Icons/graphics.gif"
	width	= 108
	height	= 44
	border	= 0
	hspace	= 16
	alt	= "Graphics"
	align	= left
	></a>

Character Styles

Let's see how to emphasise some text..
Let's see how to <em>emphasise</em> some text..
EM is called a logical style: you specify what you're trying to do, rather than how to do it. Another one is STRONG.
Another one is <strong>STRONG</strong>.
Emphasis is usually indicated with italics.
Emphasis is usually indicated with <i>italics</i>.
'Strong' is usually rendered as bold.
'Strong' is usually rendered as <b>bold</b>.
SAMP is rendered as teletype font.
<samp>SAMP</samp> is rendered as
<tt>teletype</tt> font.
And if you want something to appear exactly as you typed it, use PRE.
	And if you want something to appear
	exactly as you typed it, use PRE.
Note that HTML tags are still obeyed inside PRE. If you want to use angle brackets or HTML tags then either write &lt; for < and write &gt; for >; or try the XMP tag which renders everything literally until the closing XMP tag.. Be warned: XMP is unloved by the powers-that-be and will not survive in the standards. In my opinion - if you care to hear it - this is sad. But since I use a preprocessor to create my HTML files I can easily continue to use XMP, and the resulting HTML is still legal.

And the FONT tag lets you do more..

<font size=5 color=red>
	And the FONT tag lets you do more..
</font>

Paragraphs and Line Breaks

As mentioned above - white space and line breaks are ignored by the browser except inside special tags. You have therefore to provide tags to indicate them. If you want a line break use
<br>
and if you want a paragraph break (i.e. line break and then an empty line between paragraphs) use
<p>
The paragraph tag has an optional closing tag </p>.

Lists

There are several kinds of lists. Three important ones are
  1. Ordered.
  2. Unordered.
  3. Definition.
An ordered list has numbered items. To make the above list:
<ol>
<li>	Ordered.
<li>	Unordered.
<li>	Definition.
</ol>
To make it without numbered items:
  • Ordered.
  • Unordered.
  • Definition.
A definition list looks like this:
Ordered Lists.
The list items are ordered, e.g. by numerals.

Unordered Lists.
The list items aren't ordered particularly.

Definition Lists.
The list items have two parts: a title DT and a description DD.
A definition list is made like this:
<dl>
<dt>	Ordered Lists.
<dd>	The list items are ordered,
		e.g. by numerals.
<p>
<dt>	Unordered Lists.
<dd>	The list items aren't ordered.
<p>
<dt>	Definition Lists.
<dd>	The list items have two parts:
	a title DT and a description DD.
</dl>

Tables

Follow the above link for a detailled tutorial on table. Read on for the crash course.. Tables consist of rows containing headers and data cells:

Name Tag Typical Appearance
Table TABLEA table like this
Row TR A row like this
Head TH Bold, centered
Data TD Plain, left aligned
<table	border=2 cellpadding=8 bgcolor=white>
<tr><th> Name	</th><th> Tag</th>
	<th>	Typical Appearance </th></tr>

<tr><th> Table	</th><th> TABLE</th>
	<td>A table like this	   </td></tr>

<tr><th> Row	</th><th> TR </th>
	<td>	A row like this	   </td></tr>

<tr><th> Head	</th><th> TH </th>
	<td>	Bold, centered	   </td></tr>

<tr><th> Data	</th><th> TD </th>
	<td>	Plain, left aligned</td></tr>
</table>
The table tag attributes used here are
bgcolor
The table's background color. You can also use this attribute in the table cells.

border,
specifies the width in pixels for the border (0 for no border);

cellpadding
How much space between the border and the cell contents.

Further Resources

HTML 4.0
HTML 4.0 extends HTML with mechanisms for style sheets, scripting, frames, embedding objects, improved support for right to left and mixed direction text, richer tables, and enhancements to forms, offering improved accessibility for people with disabilities.

Tables
The new table model in HTML is based on [RFC1942]. Authors now have greater control over structure and layout (e.g., column groups). The ability of designers to recommend column widths allows user agents to display table data incrementally (as it arrives) rather than waiting for the entire table before rendering.

Style Sheets
Style sheets simplify HTML markup and largely relieve HTML of the responsibilities of presentation. They give both authors and users control over the presentation of documents -- font information, alignment, colors, etc. Style information can be specified for specific elements or groups of elements either within an HTML document or in separate style sheets.

Scripting
Through scripts, authors may create "smart forms" that react as users fill them out. Scripting allows designers to create dynamic Web pages, and to use HTML as a means to build networked applications.



Up to => Home / Authoring / HTML




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers