Results 1 to 4 of 4

Thread: The difference between href and src ?

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Three Anchor Bay, Cape Town, South Africa
    Posts
    769

    The difference between href and src ?

    Hi,

    Does anyone know the difference between href and src in html tags?

  2. #2
    Fanatic Member cpradio's Avatar
    Join Date
    Apr 2002
    Posts
    616
    which tags specifically? I know the <link> tag uses href, the <javascript> tag uses src (i think), the <img> tag uses src, the <a> tag uses href, the <base> tag uses href...i think that is it.
    http://cpradio.net/
    Administrator @ WDForums and a Moderator @ WebXpertz City Forums

  3. #3
    New Member
    Join Date
    Aug 2002
    Location
    lebanon
    Posts
    13

    Hi...

    well the <a> tag uses (href), and wewrite src to tell the browser to find the src of the thing (image, sound file,executable file.....)
    example:
    ____________________________________________________
    <img src="images\image1.jpg">
    ____________________________________________________
    <a href="www.yahoo.com">YAHOO</a>
    ____________________________________________________
    well i hope i did give you what did u want to know...
    Any Problem made by man is solved by man.

  4. #4
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    src is for tags that have to add code/images to an html page, href is for tags that provide linking and dont add any external object to the page.

    since they are both used in completely different tags, it is a moot issue though.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width