Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Quick question about links (a href) - titles and directories
Old 10-04-2009, 12:25 AM Quick question about links (a href) - titles and directories
Novice Talker

Posts: 14
Name: Nik
Trades: 0
Hi, sorry if this seems simple - I've started learning HTML and CSS and the w3schools tutorial wasn't clear about this.

Is it required to have a "title" attribute after all links?

For example:

Code:
<a href="/" title="Home">HOME</a>
Would there be any problems if I removed the title attribute? Or changed it to
Code:
title=""?
What are the advantages of having a title?

Also, when linking to pages in my website.... does it matter if my code links to www.example.com or is it okay to have href="/" as in the example above? Should I use <a href="www.example.com/about.html"> or <a href="/about.html">? Should I add a slash to the end of links (a href="/about.html/")?

Many thanks.
NikMac is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-04-2009, 01:53 AM Re: Quick question about links (a href) - titles and directories
bmcoll3278's Avatar
Super Talker

Posts: 118
Name: Brian Collins
Trades: 0
You should be able to leave that out. I think it is a css thing. My pages dont use it and pass w3c xhtml validation

this should work just fine
<a href="www.example.com/about.html">

Maybe some of the true gruros can tell you why it looks that way at the w3schools

But I know it will work fine the way you have it.

Excuse my shameless plug but try this

http://www.bmcoll.com/pagetest
You can paste in your code and it will clean it to w3c xhtml 1.0 trans.

Then you know the code should work fine.
__________________
I hope to build a site with something for every one

Please login or register to view this content. Registration is FREE
bmcoll3278 is offline
Reply With Quote
View Public Profile Visit bmcoll3278's homepage!
 
Old 10-04-2009, 07:18 PM Re: Quick question about links (a href) - titles and directories
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Quote:
I think it is a css thing
And.. you would be wrong. I would leave it IN. It's an ACCESSIBILITY "thing", allowing you to put in more of a description of what you're linking to for those visitors who may be using assistive technology.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 10-04-2009, 07:46 PM Re: Quick question about links (a href) - titles and directories
bmcoll3278's Avatar
Super Talker

Posts: 118
Name: Brian Collins
Trades: 0
Quote:
Originally Posted by LadynRed View Post
And.. you would be wrong. I would leave it IN. It's an ACCESSIBILITY "thing", allowing you to put in more of a description of what you're linking to for those visitors who may be using assistive technology.
Thank you I learned something as I said I was not sure of the reason I just knew it would work without it.

so it is kind of like the alt for images right? If thats the case I am grateful for your post I will start using it in my stuff.
__________________
I hope to build a site with something for every one

Please login or register to view this content. Registration is FREE

Last edited by bmcoll3278; 10-04-2009 at 07:49 PM..
bmcoll3278 is offline
Reply With Quote
View Public Profile Visit bmcoll3278's homepage!
 
Old 10-04-2009, 09:24 PM Re: Quick question about links (a href) - titles and directories
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Yes, it is like the alt attribute for images. In addition, the text you put into an alt attribute does not show up in Firefox when you hover over an image, but anything in the title attribute WILL.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Quick question about links (a href) - titles and directories
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.34201 seconds with 12 queries