Website Coding Stuck on a line of code? Find resources and ask your virtual assistant website programming questions here.
Forum Sponsor (Advertise with us)
Reply
 
Thread Tools Display Modes
    #1 (permalink)  
Old 04-14-2008
Tess's Avatar
Senior Member
Company name: Codehead, LLP
Latest blog post: SEO Q&A
 
Join Date: Apr 2007
Location: Portland, OR
Posts: 8,935
Blog Entries: 3
Default HTML - THE BASICS Session THREE with Codehead - archive
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: I hope you are all doing well today and that everyone been practicing with the last two sessions!

Today, I will talk about LINKS a little more and then we will learn about LISTS and TABLES.

We will use Notepad, as always! So go ahead and get your Notepad open and ready...

As you remember from session 2, here is the syntax for creating a link on a web page: <a href="THE URL GOES HERE">LINK TITLE GOES HERE</a>

Now, if you want to link to an EMAIL ADDRESS, the syntax is slightly different: <a href="mailto:THE EMAIL ADDRESS GOES HERE">LINK TITLE GOES HERE</a>

So an example would be:
<a href="mailto:hamid@somedomain. com">Email Me!</a>

Clicking on this link will launch the visitor's default email software's "New Message" window, where your visitor can write an email to whatever email address you've provided and send it. To test this, open a new Notepad file and copy and paste ALL of the following code into it (remember the dashes are just placeholders and should not be copied into your code):

------------------------
<!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>
To contact us, <a href="mailto:hamid@somedomain. com">click here!</a>
</body>
</html>
------------------------

Save it as email_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...mail_link.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? Any problems?

There is also a way to automatically add a SUBJECT LINE for the email from within this link.

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>Contact Us</title>
</head>
<body>
<h1>Contact Us</h1>
To contact us, <a href="mailto:hamid@somedomain. com?subject=Your Coding Services">click here!</a>
</body>
</html>
------------------------

Save it as email_link_subject.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...k_subject.html

Now what do you see when you click the link? Any problems?

As you might know already, I wouldn't recommend adding your email address to your web pages like this. That is because there are some web crawlers or spiders that crawl web pages and look for text patterns like email addresses. Then they save the email addresses for sale later - to send spam to.

There are a few ways to prevent this from happening:
1 - Having a contact form instead, which requires some programming knowledge beyond basic HTML
2 - The easiest way - which is to encode the email address using our very own tool provided free on the forums:
http://www.virtualassistantforums.co...code-email.php
This tool will encode the email address for you before you place it on your site. Since the email address is encoded and doesn't look like a normal email address, those sneaky spiders won't be able to see it. You can read the thread about this tool here: Quick email encoder - antispam

Links can also have an attribute called "TITLE" which is intended to provide some information about the link. For example, this information will be shown like a tooltip when you mouse over the link or it might be provided as a spoken voice by some browsers for users who can't see.
So it's very good practice to have good "title" attributes much like we talked about using "alt" attributes for images.

Here is a link with a title attribute: <a href="http://www.virtualassistantforums.com/" title="Virtual Assistant Forums">Virtual Assistant Forums</a>

To test how it works, 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>Links</title>
</head>
<body>
<h1>Links</h1>
<a href="http://www.virtualassistantforums.com/" title="Virtual Assistant Forums">Virtual Assistant Forums</a>
</body>
</html>
------------------------

Save it as link_title.html on your desktop and double click on the new file icon. When your browser displays the page, mouse over your link, don't click on it and see what happens.
View my own example online and compare to your own page: http://www.virtualassistantforums.co...ink_title.html

What do you see when you mouse over the link but don't click it?

There is one more thing about links I'd like to share with you before we move on.

You can also link images (so they function as a link when clicked - this is great for menus where you've used a graphic for your buttons, etc.)

Here's how: <a href="URL OF THE LINK"><img src="PATH TO THE IMAGE"></a>

To test this, 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>Links</title>
</head>
<body>
<a href="http://www.virtualassistantforums.com/" title="Virtual Assistant Forums"><img src="http://www.virtualassistantforums.com/images/logo/logo.gif" alt="Virtual Assistant Forums"></a>
</body>
</html>
------------------------

Save it as image_links.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...age_links.html
How does your own page look? What do you see?

Notice, there is an unwanted border around the image; the image doesn't have a border in it's original design but linking it causes the border to appear.

To remove the border, we have another attribute called "BORDER" for image elements and it works like this:

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>Links</title>
</head>
<body>
<a href="http://www.virtualassistantforums.com/" title="Virtual Assistant Forums"><img src="http://www.virtualassistantforums.com/images/logo/logo.gif" alt="Virtual Assistant Forums" border="0"></a>
</body
</html>
------------------------

Save it as image_links_no_border.html on your desktop and double click on the new file icon.

Please take a moment to do this now and let me know if you have any questions.

My example online: http://www.virtualassistantforums.co...no_border.html
How does your own page look now?

Now edit the same file and try changing the border to 15 and see what happens, that is you will have to replace 'border="0"' with 'border="15"'
One common practice for linking images is to link your logo on all the pages of your website back to your home page.

You can see this on Virtual Assistant Forums: Click on the logo from any page and you will see it's always linked to the home page.

Does anyone have any questions so far?
How are you feeling about what you're learning?

Member: overwhelmed?

Codehead: What is it that's overwhelming you?

Member: All the information! Hoping that I don't forget it all.

Moderator: Don't feel like you have to remember all of this right away - HTML is accumulative....that is, the more you use, and the more often you use it, the stronger your skills become. It may be hard to imagine but there really will come a time when much of what you've done from Sessions One, Two, and now Three will be like cake for you...easy! Just keep practicing when you have time, revisit the archives, and just take the live class as the opportunity to see live examples of each of these elements. It *is* another language so be patient with yourself

(Content cont'd in next post, scroll down to continue reading)
__________________
Stuck in startup? Stop dreaming. Start DOING!
Get the Become a Virtual Assistant eBook for just $29
Reply With Quote
    #2 (permalink)  
Old 04-14-2008
Tess's Avatar
Senior Member
Company name: Codehead, LLP
Latest blog post: SEO Q&A
 
Join Date: Apr 2007
Location: Portland, OR
Posts: 8,935
Blog Entries: 3
Default HTML - THE BASICS Session THREE with Codehead - Archive
Codehead: There is one more popular HTML element called LISTS.
Here is the genral form of a list:

<ul>
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
</ul>

"ul" stands for UNORDERED LIST and "li" stands for LIST ITEM. Unordered lists are the most common types of lists.

To see how this works, 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>Lists</title>
</head>
<body>
Our services:
<ul>
<li>Custom programming</li>
<li>Website design</li>
<li>Search engine optimization</li>
</ul>
</body>
</html>
------------------------

Save it as ul_lists.html on your desktop and double click on the new file icon. My own example online: http://www.virtualassistantforums.co..._ul_lists.html

Please take a moment to do this now and let me know if you have any questions.
How does your own page look?

Notice how each item is displayed; there is a circle next to each item.

We also have another type of list which is ORDERED LIST or "ol". In an "ol", items have numbers next to them.

To test this, 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>Lists</title>
</head>
<body>
Our services:
<ol>
<li>Custom programming</li>
<li>Website design</li>
<li>Search engine optimization</li>
</ol>
</body>
</html>
------------------------

Save it as ol_lists.html on your desktop and double click on the new file icon. Note the difference. My own example online: http://www.virtualassistantforums.co..._ol_lists.html
How does your own page look?

So you can see that starting your list with <ul> creates a list with the 'circle' bullet point. Starting your list with <ol> starts your list with the number 1.

ALWAYS remember to close both your <li> tags (with </li>) and your <ul> and <ol> tags (with </ul> and </ol>)! Just like with all of the tags we've discussed so far, keep track of your tags.

As always, you can have HTML elements within HTML elements, so you can have links or even images inside your LIST.

To test this, 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>Lists</title>
</head>
<body>
Virtual Assistant Forums:
<ul>
<li><a href="http://www.virtualassistantforums.com/forumdisplay.php?f=19">Coding Forums</a>: You can ask questions about website coding here.</li>
<li>Ask questions about search engine optimization <a href="http://www.virtualassistantforums.com/forumdisplay.php?f=20">here</a></li>
</ul>
</body>
</html>
------------------------

Save it as a_ul_lists.html on your desktop and double click on the new file icon. My own example online: http://www.virtualassistantforums.co..._ul_lists.html
Please take a moment to do this now and let me know if you have any questions. What do you see?

Since you can have HTML elements inside HTML elements, you can also have lists inside lists!

This is a nice tool for when you have very long lists with subcategories or sublists that need to display properly.

To test this, 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>
<title>Nested Lists</title>
</head>
<body>
<ul>
<li>
Parent list item 1
<ul>
<li>Child list item 1</li>
<li>Child list item 2</li>
</ul>
</li>
<li>Parent list item 2</li>
</ul>
</body>
</html>
------------------------

Save it as ul_ul_lists.html on your desktop and double click on the new file icon. My own example online: http://www.virtualassistantforums.co..._ul_lists.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?

There is no limit on how many child lists you can have!

You can see that I've opened the MAIN LIST <ul>, the parent list - and then opened ANOTHER list inside that list <ul>.

When the child list is finished, I close it properly </ul>, continue on with my parent list, if I want...and then I close the parent list when I'm finished </ul>. You can continue to add as many child lists as you like - just make sure you close each one AND the main parent list so that the whole thing displays properly.

The next topic today is TABLES.
Tables are used for showing table-like structures of data. Here is what the code for a simple table looks like:

<table>
<tr>
<td>Some info goes here</td>
</tr>
</table>


The elements of this table code are:
1) <table></table>: Defines the begining and the end of the table and like all the other HTML elements it starts with a starting tag <table> and ends with </table>

<tr></tr>: 2) "TR" stands for "Table Row" and it defines a HORIZONTAL ROW.

<td></td>: 3) "TD" stands for "Table Data" and defines a CELL in the table.

Here is a picture to help illustrate: http://www.virtualassistantforums.co..._structure.gif

As you can see, you can have unlimited table rows and table cells, here is an example.
Consider you want to create an online sales listing for three computers:

1 - A Dell laptop that's $800
2 - A Toshiba laptop that's $700
3 - An HP laptop that's $750

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>Tables</title>
</head>
<body>
<table>
<tr>
<td>Type</td>
<td>Manufacturer</td>
<td>Price</td>
</tr>
<tr>
<td>Laptop</td>
<td>Dell</td>
<td>$800</td>
</tr>
<tr>
<td>Laptop</td>
<td>Toshiba</td>
<td>$700</td>
</tr>
<tr>
<td>Laptop</td>
<td>HP</td>
<td>$750</td>
</tr>
</table>
</body>
</html>
------------------------

Save it as table.html on your desktop and double click on the new file icon. My own example online: http://www.virtualassistantforums.co...tml_table.html
Please take a moment to do this now and let me know if you have any questions.

Do you see how this could be useful on your own website?

As you can see, the columns of this table are very close to each other, to make it easier to read and look nicer, we use an attribute called "WIDTH".

To test this, 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>Tables</title>
</head>
<body>
<table>
<tr>
<td width="100">Type</td>
<td width="100">Manufacturer</td>
<td width="100">Price</td>
</tr>
<tr>
<td>Laptop</td>
<td>Dell</td>
<td>$800</td>
</tr>
<tr>
<td>Laptop</td>
<td>Toshiba</td>
<td>$700</td>
</tr>
<tr>
<td>Laptop</td>
<td>HP</td>
<td>$750</td>
</tr>
</table>
</body>
</html>
------------------------

Save it as table_width.html on your desktop and double click on the new file icon. My own example online: http://www.virtualassistantforums.co...ble_width.html
Please take a moment to do this now and let me know if you have any questions.

Member: You only changed the first lot of "td" (Table data) but all follow

Codehead: Yes, that's enough to tell the browser the size of the column!
Does it look better now?

This way, it's also easier to change the size of the column, that is, you only change the width on the first row, rather than changing the width on every single table cell.

Please note that, you don't need to have the exact same width for each column, that is you can have different widths depending on your data. If a column needs more room, simply give it more width 'width="100"' means that you want this cell to be 100 pixels wide.

Note that I only set the width on the cells of the first row and the browser *automatically* changes the width of all of the following cells. As you can see, it does look much nicer!

(Content cont'd in next post, scroll down to continue reading)
__________________
Stuck in startup? Stop dreaming. Start DOING!
Get the Become a Virtual Assistant eBook for just $29
Reply With Quote
    #3 (permalink)  
Old 04-14-2008
Tess's Avatar
Senior Member
Company name: Codehead, LLP
Latest blog post: SEO Q&A
 
Join Date: Apr 2007
Location: Portland, OR
Posts: 8,935
Blog Entries: 3
Default HTML - THE BASICS Session THREE with Codehead - Archive
Codehead: You can also use PERCENTAGES for your width attribute, here is an example:

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>Tables</title>
</head>
<body>
<table width="100%">
<tr>
<td width="33%">Type</td>
<td width="33%">Manufacturer</td>
<td width="33%">Price</td>
</tr>
<tr>
<td>Laptop</td>
<td>Dell</td>
<td>$800</td>
</tr>
<tr>
<td>Laptop</td>
<td>Toshiba</td>
<td>$700</td>
</tr>
<tr>
<td>Laptop</td>
<td>HP</td>
<td>$750</td>
</tr>
</table>
</body>
</html>
------------------------

Save it as table_width_percentage.html on your desktop and double click on the new file icon. My own example online: http://www.virtualassistantforums.co...ercentage.html
Please take a moment to do this now and let me know if you have any questions.

They are very far apart because we set the width of our entire table to 100%, so it grows to fit in your browser's entire width.

As you may have noticed already, you can set the width attribute for the entire table itself (rather than for a cell).

When you set the table width to 100%, that means it will take up ALL the available space on the browser window horizontally.

In our example there are 3 cells and they are then set to each have a width of 33% of the available space so that all together they are almost 100% (33 x 3 = 99%). You can have as many cells as you like - and will want to experiment with what works best for a particular page.

We can also use the attribute of BACKGROUND COLOR to make our table more readable.

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>Tables</title>
</head>
<body>
<table>
<tr bgcolor="#999999">
<td width="150">Type</td>
<td width="150">Manufacturer</td>
<td width="150">Price</td>
</tr>
<tr bgcolor="#EFEFEF">
<td>Laptop</td>
<td>Dell</td>
<td>$800</td>
</tr>
<tr>
<td>Laptop</td>
<td>Toshiba</td>
<td>$700</td>
</tr>
<tr bgcolor="#EFEFEF">
<td>Laptop</td>
<td>HP</td>
<td>$750</td>
</tr>
</table>
</body>
</html>
------------------------

Save it as table_bg.html on your desktop and double click on the new file icon. My example online: http://www.virtualassistantforums.co..._table_bg.html. Please take a moment to do this now and let me know if you have any questions.

How does your own page look?

Here you are using the attribute "bgcolor" to change the background color of rows and even of individual cells if you want.

You can find all kinds of colors to use on your website by searching Google for 'Color Hex Codes' or similar and by using a graphic design program like Fireworks, or similar, to import an image you want to find a specific color from and using the various tools available to get specific hex codes. This is our favorite method for finding a color palette to use on a website when we are working from an existing logo that as a certain color scheme.

Here is your homework today:
First I want you to read ALL the sessions up until now, one more time - even if you've already gone through them once before.
Then I want you to make a THREE PAGE WEBSITE.
3 pages: one is your home page, one is your about page and one is your contact page.
These pages should bery very basic and should use only the tools you've learned thus far in these three sessions.
Your website should have each of the following elements:
Use headings and all of the other proper HTML elements we've learned to create the content of your pages.
You need to provide a way for the visitor to contact you on the contact page.
You should have proper page titles.
Include at least one list on your About Us page.
Use at least one image on each of the three pages.
You should have your logo on all of the pages and link it to your home page.
You should use ONLY Notepad or a similar text editor to do this work. NO Dreamweaver, Frontpage etc.

NOTE: This will be the last straight HTML session. We will move on quickly to more practical and real life topics about CSS. CSS = Cascading Style Sheets and is what you will use to bring all of the things you've learned so far into a cohesive website design. At this point you have enough knowledge to start learning CSS and the way we will learn CSS is very exciting. We will learn through real-life examples, we will learn the latest techniques for creating web pages through practical examples - and it WILL all come together for you. You're all doing great and hopefully can see some progression now that you've moved step-by-step through some basic HTML. But the first CSS session will be a general intruduction to CSS with some further info on HTML coding standards.

Have fun and happy coding!

Here are all the examples from this session: http://www.virtualassistantforums.co...ml_css_s3.html
__________________
Stuck in startup? Stop dreaming. Start DOING!
Get the Become a Virtual Assistant eBook for just $29
Reply With Quote
    #4 (permalink)  
Old 04-14-2008
vainparadise's Avatar
Resident Member
Company name: A Virtual Assistant in Paradise
 
Join Date: Oct 2007
Location: Florida
Posts: 1,853
Blog Entries: 1
Send a message via Skype™ to vainparadise
Default Re: HTML - THE BASICS Session THREE with Codehead - Archive
Thanks for this Tess! I now have some good reading for the plane tomorrow
__________________
Dawn Riley
A Virtual Assistant in Paradise
Our business is about making yours better
Reply With Quote
    #5 (permalink)  
Old 10-24-2008
Contributing Member
Company name: Virtual Roadie
 
Join Date: Oct 2008
Location: Alberta, Canada
Posts: 106
Default Re: HTML - THE BASICS Session THREE with Codehead - live forum event archive
To Tess and Hamid,
Thank you so VERY much for your exceptionally kind efforts in putting these exercises together for everyone to benefit from. I have thoroughly enjoyed every minute of the first few lessons and can't wait to put together my 3 page website. Again, Thank you!

Namaste,
Mary Jo (Artsie)
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
HTML - THE BASICS Session ONE with Codehead - archive Tess Website Coding 8 04-12-2010 07:15 PM
HTML and CSS - THE BASICS Session SIX with Codehead - archive VAF Admin Website Coding 4 02-14-2010 10:14 PM
HTML and CSS - THE BASICS Session FIVE with Codehead -archive Tess Website Coding 3 11-06-2008 09:48 PM
HTML and CSS - THE BASICS Session FOUR with Codehead - archive Tess Website Coding 3 05-22-2008 04:55 PM
HTML - THE BASICS Session TWO with Codehead - archive Tess Website Coding 2 03-25-2008 02:08 AM


All times are GMT -4. The time now is 06:26 AM.

International Virtual Assistants Association
Project Management for Virtual Assistants
Virtual Assistant Forums Advertising
Virtual Assistant Directory
Create a Professional New Client Welcome Packet
Virtual Assistant Forums Advertising
Virtual Assistant Contracts
Virtual Assistant Services
Affordable Website Hosting
Work from Home | Become A Virtual Assistant
Affordable Logo Design
Virtual Assistant Forums Advertising
Small Business Resources

© Virtual Assistant Forums 2012
All content and images are protected under copyright law and may not be reproduced in any way without express written consent.