doubledecker Posted August 13, 2013 Share Posted August 13, 2013 Hi all, Just learning HTML5 (or any form of HTML for that matter.I found (and then forgot) where I could create a link like "click here" , and when you hover over the link "click here" it would show the destination like www.w3schools.com I can't seem to find the section & how to code this. Also when using an image as a link like: <p>Create a link of an image: <a href="default.asp"> <img src="smiley.gif" alt="HTML tutorial" width="32" height="32"></a></p> What does the "default.asp" & "HTML tutorial" mean or link to? Any help would be appreciated! Thank you! Link to comment Share on other sites More sharing options...
davej Posted August 13, 2013 Share Posted August 13, 2013 See... http://www.w3schools.com/tags/att_global_title.asp http://www.w3schools.com/tags/tag_a.asp For an image the alt is the text that will appear if the image file can't be found. For a link, also known as an anchor, the href is the destination URL. If you click on a link with href="www.google.com" then you will be sent to http://www.google.com. Link to comment Share on other sites More sharing options...
justsomeguy Posted August 13, 2013 Share Posted August 13, 2013 If you click on a link with href="www.google.com" then you will be sent to http://www.google.com. You would need to use href="http://www.google.com", or else it would treat the link as a relative URL on your site. Link to comment Share on other sites More sharing options...
davej Posted August 13, 2013 Share Posted August 13, 2013 Oops, yep. <!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><title>Title</title></head><body><a href="google.com">google.com</a><br/><a href="www.google.com">www.google.com</a><br/><a href="http://www.google.com">http://www.google.com</a></body></html> Link to comment Share on other sites More sharing options...
doubledecker Posted August 13, 2013 Author Share Posted August 13, 2013 Thanks guys, davej, I appreciate the clarification of the alt text. I get how linking to a URL works. I'm still confused as to what "default.asp" after the <a href= means..... Thoughts? Also is HTML5 basically adding new features, or upgrading the old HTML format? Sorry for all the questions! I'm trying to teach myself. Are there any other sites that you can recommend to help me learn? I feel like W3 does a good job but just skims the surface. Thanks! Link to comment Share on other sites More sharing options...
justsomeguy Posted August 13, 2013 Share Posted August 13, 2013 default.asp is the name of the file they are linking to. HTML5 adds new features, it does not change the syntax rules of HTML. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now