|
Pat's
Web Page Tutorials |
Very Basic HTML |
|
||||||||||||||||||
|
CREATING WEB PAGES: Basic HTML Basic TAGS Basic TABLES HTML Editors About LINKS Name ANCHORS NAMING WebPages SCANNING Photos YourGenealogyWebsite HTML or XHTML? COPYRIGHT&PRIVACY ISSUES: Copyright FAQ Privacy for the Living Email Encryption UPLOADING: FTP Drag&Drop File Manager FUN THINGS TO ADD: Add a Counter Add a Guestbook Family Group Sheet Forms (MailMerge) MORE HELP: Freepages Help&FAQs Change the Counter's Appearance Betsy Mills: REALLY Basic Help Pat Geary: Website Design for the Genealogist Marcia Hellam: Website Building With No Hard Drive Cliff Lamere: The Basics of RootsWeb Counters Robin Moore: Web Editing & Genealogy Toolbox Rod Neep: WebPage Design Cheri Zuber: Genealogy Computer Tips |
Every new, or potential webmaster has had a moment of panic when he or she suddenly realizes he doesn't know a thing about writing HTML. There is even a rumor going around that it is a "foreign" language. It is NOT! The basics needed to write your first web page in HTML are very few and very simple. There are many excellent HTML tutorials on line; and this brief one is not meant to teach you everything they will. But I hope to make the idea of writing HTML a little less scary to the beginning web author, and help the WYSIWYG ( What You See is What You Get ) user learn how to tweak what their software hath created. One of the exciting things about the web is that it is constantly changing. Your web page will too. Don't worry if your first effort isn't exactly what you envisioned. Write your first, basic page in HTML and put it on line. I guarantee you'll be changing and improving it, over and over again. Table of Contents
What is HTML and why do I need TAGS?
Hyper
Text
Markup
Language
is the language of the Web. The most beautiful and complex
web page is created with simple text commands that can be
written in a plain
text editor,
such as Window's NotePad.
HTML is just
plain english,
written in a dialect that uses
something called
tags.
Tags are those cryptic
words or abbreviations you see enclosed in angle brackets
Tags you can't do without!A basic web page requires only four tags. Surprised? Well, it's true! The HTML code for a basic page looks like this:
And it looks something like this in Internet Explorer:
The Tag RulesWell -- I told you it was a basic page, didn't I? You jazz up your page by using the formatting tags. There are many more tags than the basic ones discussed here. But all tags follow certain rules. Think of them as switches that you turn on and off. Rule 1. All tags are enclosed in angle brackets: < > Rule 2. Every tag that is opened (turned on) must be closed (turned off). Close every tag just as soon as it has completed its job. The opening tag (turn this command on) looks like this:
The closing tag (turn this command off) adds a forward slash like this
Rule 3. Tags are closed in the reverse order from which they are opened. Tags usually occur in pairs and are often nested, one pair inside another. Read backward to the left to find the last tag you opened. Close it first. Then close the one before that, etc. Each pair of tags in the example below is a different color, so you can easily see the sequence in which they are opened and closed.
Rule 4. Tags must tell the browser both what to do and how to do it. The "what" is called an attribute and the "how" is called a value. Attributes are things like color, size, and alignment. Values are color names, fixed values like left|right|center, or a URL, and are preceded by the equals ( = ) sign. The value should be enclosed in quotation marks. To align (attribute) a paragraph (tag) in the center (value), the HTML is
For a chart of the basic tags and their attributes, click here. Rule 5. Attributes are added to a tag in series. This is right :-)
This is wrong :-(
Table of Contents
Changing the BackgroundOne of the easiest things you can do to make your page unique is to change the background. To change the color of your background: Tag to modify: body To use a tiled image (texture or picture) for your background: Tag to modify: body If you have placed your graphics in a subdirectory, you will need to add the path (location) to the file name.
"Paths" are explained in detail in More Than you Wanted to Know About LINKS. Changing the Text: Color, Size and FaceThe color of the text on your page is another easy thing to change. To change the default for all of the text on your page: Tag to modify: body To make local changes to text within the body of the document, use the font tag: Tag to add: font To change the color, size and face --
Adding a LinkLinking your pages to each other, and to other interesting and related sites make you a part of the wonderful World Wide Web. Links can be relative (to another page at the same URL), or absolute (to a page at a different URL). Tag to add: anchor Link to a page at the same URL (relative link):
Link to a page at a different URL (absolute link):
A variation of the HREF link is the name anchor. This link takes your visitor to a specific location on a page. See Moving Around a Page Another useful link allows your visitor to send you an email, just by clicking a link. The HTML is similar to the page link, but changes http:// to mailto:
Understanding how links work (and why they sometimes do not) is essential knowledge for any web author. For a more detailed explanation, see More Than You Wanted to Know About LINKS.
Adding an ImageAdding an image is as simple as telling the browser what image to display and where to find it. (Remember to upload the image file to your website first :-) Together, the what and where make up the URL of the image. In other words, you'll be linking the image to your page. Tag to add: image If the image you want to add is at a different URL, then you will need an absolute link as described above in Adding a Link. While not required, adding the width, height, and alternate attributes to the image tag will speed up the display in most browsers. The values for the width and height attributes are stated in pixels. Most graphic programs will tell you the size of your image in pixels. Add the appropriate attribute values to the image tag. The alternate tag displays text if the visitor chooses a "text only" view of your page or is unable to load the image. The value for the alternate tag is the text you would like to have displayed if the image download fails.
The larger the size of the image file, the longer it will take to download. Try to keep your image files under 30K in size. If you must share a full screen view of Great Uncle Thadeus at 200K, use a thumbnail (file size under 10K) on your page, and make the thumbnail a link to the full screen version. It's also a good idea to warn your vistor they are accessing a large file that may take time to download.
Hexadecimals! Why not Red, Green and Blue?
The Hexadecimal Code is a fancy name for the
simple solution the HTML wizards invented to tell a
browser what color to display. Based on the
Red-Green-Blue palette, each color of the palette is given a two
digit value, expressed as #RRGGBB. Valid numbers
are zero (0) through nine (9) then A through F. The
possibilities are practically limitless. You can have fun
with this one!
Table of Contents
Sample META TAGSMETA tags are often overlooked by the beginning web author, but they are important and should always be included in your HTML. The META tags are inserted between the HEAD tags and may identify you as the author, tell the browser what to show in the title bar at the top of the browser window, tell search engines how to index your page, tell web spiders they are welcome or to keep out, etc. You can copy and paste these META tags into your own HTML. Replace the colored text with your own.
Effective use of META tags can make a difference in the amount of traffic your site receives. The ones shown here are the minimum that should be included. An excellent tutorial on META tags, how search engines use them, and how to get search engines to list your site, is Jim Keebaugh's Search Engines and Directories or, How to Get Found on the Web. Top Secret!Actually, there is nothing secret or difficult about writing and editing HTML by hand. Top Secret just makes a catchy header for this section ;-) However, you must remember that HTML is a very precise language, and many browsers are unforgiving of even minor errors. Since it is oh, so particular about the way it is written, I recommend OESOE ;-)
O
pen the page in your text editor.
Does it look as you intended? Great! Make your next addition or change, save, and check your browser again. If it's not quite right, you'll know what section of HTML you have just added or changed, and should be able to find the mistake quickly. Reviewing each addition or change as you go can catch a minor error before it becomes a major problem. This technique is also an easy way to experiment with "what if" changes. When you save your change, use the "save as" command in your text editor. You can experiment to your heart's content without corrupting your original HTML.
To learn more about HTML, see these tutorials: |
|||||||||||||||||||
|
http://freepages.computers.rootsweb.ancestry.com/~pasher/basichtml.htm
Copyright ©2000-2008 Pat Asher |
||||||||||||||||||||