SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Threaded View

  1. #1
    SitePoint Enthusiast
    Join Date
    May 2006
    Location
    Ljubljana, Slovenija, Europe
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Is there any reason to use CSS instead of HTML ??

    For instance, consider a totally banal case of specifying the border (values 1 or 0) around an image?? I mean is it generally better to use CSS instead of HTML, or in such cases it doesn't matter, and one should probably only look for a size of the code (i.e. which method needs more lines/chars), at least if one is a minimalist like I am -- ...


    So here is "CSS-style" example:

    Code:
    <img style="border:0; width:88px; height:31px" src="http://example.com/some-image.gif" alt="some-image.gif">

    And an "HTML-style" example:

    Code:
    <img border="0" width= "88px" height="31px" src="http://example.com/some-image.gif" alt="some-image.gif">
    P.S. -- Oh and btw., is there any "unwritten rule", saying which particular tag to use in which order; in CSS-style's case, which one is first, which one second etc.: style, src, or alt (and maybe we can include title one too), and in HTML-style's case, the appropriate order of the main/non-optional style and src ones (and again, we can possibly include alt and title ones), and an "inner" order of border, width, and height ones ??


    satyr
    Last edited by satyr; Sep 14, 2006 at 16:47. Reason: just fixed the BBCode, i.e. an "one letter" fix ...
    See my computing-related homepage: http://tadej-ivan.50webs.com/.


Bookmarks

Posting Permissions

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