Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: Semantics

  1. #1
    New Coder Ibanez's Avatar
    Join Date
    Nov 2008
    Location
    South Africa
    Posts
    73
    Thanks
    11
    Thanked 0 Times in 0 Posts

    Semantics

    Hi all!

    I have a quick question, which is semantically more correct:
    Placing an image like this <div><img src="" alt="" title="" /></div>
    Or by using CSS as background-image?

    I really want to form good habits over here...

    thanks!
    If your willing to teach, Im willing to learn...

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,863
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    I have a quick question, which is semantically more correct:
    Placing an image like this <div><img src="" alt="" title="" /></div>
    Or by using CSS as background-image?
    That surely depends on your requirement.
    If that image is for styling your page, then it should be served as a background.
    If that image has some other purpose in your document, say a logo, title, icon, picture to be displayed in a gallery page or in a profile page etc, then it should be served as an img, so as to be visible even in the naked css
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,777
    Thanks
    6
    Thanked 1,021 Times in 994 Posts
    This is a cross post. Please don’t do this, Ibanez. You should know this by now!
    The other post (with more replies) is located at Semantics

  • #4
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,863
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    This is the first one and found the other one after posting here
    Last edited by abduraooft; 05-27-2009 at 04:02 PM.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

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