NOTE: These archives, as well as ALL posted material on Virtual Assistant Forums, is copyrighted and may NOT be copied to another site under ANY circumstances unless otherwise noted. Please respect this free community feature!
Codehead: We're going to move into Session Two with the assumption that you were either with us live for the last session or have studied the first session (which was archived just over a week ago). Today we are going to see some more HTML concepts that build on the material that was presented in the fist session. Here is the link to the archived version of the first session:
HTML - THE BASICS Session ONE with Codehead - archive
We'll be using Notepad again today - as we did last time, so please get yours open and ready
Today we will start with the concept of hyperlinks.
Hyperlinks are references to other pieces of content or pages on the web, either on the same site which we call it an 'internal link' or to another site which is called an 'external link'.
These are one of the most important elements on any web page because without them, there would be no navigation from page to page.
Now, open a new Notepad and copy and paste ALL of the following code into it (remember our TEMPLATE from last session?)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Links</title>
</head>
<body>
<a href="http://www.virtualassistantforums.com/">Virtual Assistant Forums</a>
</body>
</html>
Save it as link.html on your desktop and double click on the new file icon.
When your browser displays the page, click on your link! View my own example online and compare to your own page:
http://www.virtualassistantforums.co..._css_link.html . Please take a moment to do this now and let me know if you have any questions. How does your own page look? Any problems? Does the link work?
Up to this point, we have only learned about a few basic HTML tags, such as <strong></strong> or <em></em>.
Hyperlink tags are different from basic HTML tags in that hyperlink tags introduce another concept: ATTRIBUTES.
In a hyperlink, 'href' is the attribute:
<a href="http://www.virtualassistantforums.com/">Virtual Assistant Forums</a>
Attributes have this general form: attribute name="attribute value" - They have a name followed by an equal sign followed by a value inside double quotes, for example: href="
http://www.virtualassistantforums.com/"
Don't feel overwhelmed by these, you will learn more and memorize all of them as you use them more.
So here, href is the NAME of the attribute and
http://www.virtualassistantforums.com/ is the VALUE of it.
Note that it is very important that you place the attribute value inside a pair of double quotes like this "
http://www.virtualassistantforums.com/"
So, a hyperlink has this general form: <a href="THE URL GOES HERE">LINK TITLE GOES HERE</a>
From now on the tags we are going to learn will have ATTRIBUTES.
Please note that if you want to link to a page that is on *another* website, you need to include http:// at the beginning of the link like this:
<a href="
http://www.virtualassistantforums.com/">Virtual Assistant Forums</a> . If you don't include http:// this link will be considered an internal link, that is - a link to a page on the same site or domain, and it will not open correctly.
Now, let's see what we can do with hyperlinks. Open a new Notepad file and copy and paste ALL of the following code into it:
As you'll recall from last session - I will use dashes to denote when a section of code starts and when it ends - when I tell you to copy/paste DON'T include the dashes. They're just placeholders
-------------------------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Contact Us</title>
</head>
<body>
<h1>Contact Us</h1>
This is our contact page, to read about us please click <a href="about_us.html">here</a>.
</body>
</html>
-------------------------------------------------------
Save it as contact_us.html on your desktop.
Now, open another text editor and copy and paste ALL of the following code into it:
-------------------------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>About Us</title>
</head>
<body>
<h1>About Us</h1>
This is our about us page, to contact us please click <a href="contact_us.html">here</a>.
</body>
</html>
----------------------------------------------------------
Save this one as about_us.html on your desktop and double click on the new file icon. View my own example online and compare to your own page:
http://www.virtualassistantforums.co..._about_us.html
There are a few very important notes that I want to mention here:
1 - Notice the PAGE TITLE, it should reflect what the page is about exactly. A very big and common mistake is to have titles like "page 1", "home" etc.
2 - Notice the FILE NAME of the pages, they also should reflect what the page is about. DO NOT call your About Us page: page_1.html, *never*. This is good coding practice and also helps you find your pages more easily later from among the numerous page files that will make up your website.
Some people don't pay attention to these issues when building a website or maybe they just aren't aware, but the end result of ignoring best practices such as these is ending up with a low quality website and a possible mess later on. Again this is very, very important - make note of it now and utilize it to your advantage.
Now, lets see some more attributes a hyperlink can have, the next one is TARGET.
To see an example of TARGET open a new Notepad file and copy and paste ALL of the following code into it:
-------------------------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Target Attribute</title>
</head>
<body>
<a href="http://www.virtualassistantforums.com/" target="_blank">Virtual Assistant Forums</a>
</body>
</html>
-------------------------------------------------------
Save it as target.html on your desktop and double click on the new file icon. When your browser displays the page, click on your link! View my own example online and compare to your own page:
http://www.virtualassistantforums.co...nk_target.html
Please take a moment to do this now and let me know if you have any questions. What happens when you click the link in this example that is different from the previous link example you created?
Member: The link opens in a separate page.
Codehead: Good!
So to make a link open in a new window, add this to it: target="_blank"
A link like this: <a href="LINK URL" target="_blank">LINK TITLE</a> will always open in a new window!
I know these elements can all feel a bit piecemeal right now - but bear in mind these early sessions give you a set of tools that ultimately will come together to help you form a proper web page. We'll continue to build on each session and will ulitmately help you meld what you've learned to be confident and skilled enough to code an entire web page. For now, you're working with the individual pieces of the puzzle
As with all HTML code, you will learn to remember these various items through practice and use - like anything, working to become familiar with the terms, tags, attributes etc. will help speed up your work over time. Keep practicing and you WILL retain the info.
Now let's see how we can add images to web pages.
These days, images are a VERY important element of all web pages. You won't find a web page that doesn't have some sort of an image on it. Logos, icons, graphics, photos, and banner ads are all different ways that web developers and designers use images to make a web page look nicer or add clarity to it - images can also make a website easier to navigate.
We'll need an image to start, here is an image I prepared for us to use today:
http://www.virtualassistantforums.co...ses/mooshy.jpg
Please open the link and then right click on the image and click "Save Picture As..." or "Save Image As..." (Depending on your browser) and save it **on your desktop***.
Rename the file - mooshy
(For those of you who don't know him, this is Mooshy, our dog, we found him in the streets while we were living in India when he was four weeks old and very sick and have raised him to good health and kept him with us ever since!

)
(Content cont'd in next post, scroll down to continue reading)