![]() |
|
|
|
||||||||||
![]() |
|
|
Thread Tools |
|
#1
|
||||
|
||||
|
Any reason to rather use CSS and not HTML...
.... in a totally basic/fundamental case of, for instance, specifying the border around a graphic/image on a page?? I mean is it generally better to use CSS instead of HTML, or in such cases as border around a graphic 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, lol.
The "CSS-style example code: Code:
<img style="border:0; width:88px; height:31px" src="http://example.com/some-image.gif" alt="some-image.gif"> The HTML style example code: Code:
<img border="0" width= "88px" height="31px" src="http://example.com/some-image.gif" alt="some-image.gif"> I am also curious, is there any "unwritten rule" that says 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), and in HTML-style's case, the appropriate order of the main/non-optional "style" and "src" (and again, we can possibly include alt and title ones too), and a sort of a "inner order" of border, width, and height ones ?? tayiper
__________________
If you want to, please check out my main general personal http://tadejpersic.50webs.com/ website, which is a some sort of a navigational site that basically only describes and lists links to my other websites and blogs. Last edited by tayiper; Sep 14th 2006 at 6:00 pm. |
|
#2
|
|||
|
|||
|
One of the most important reasons why it's better to use CSS instead of HTML when it comes to defining how your website looks (i.e. colo of background, font color, border of images, etc) is that you can do all the styles in a CSS file and then just link this sheet to many HTML pages. And how does this comes handY?
Well for instance once you finish your site and you decide to change the background color of your site, if you use HTML you would have to open all the HTML pages you made and change the background tag for each page which is time consuming and annoying. In the other hand if you would have used CSS and link it to all your sites, you would just go to the sheet and change the properity of the background color and automatically the background on all your pages would change. Also CSS gives you more control of how your web page looks. Jose |
|
#3
|
||||
|
||||
|
Quote:
Anyway, I was told on some other forum that the "align", "border", "hspace", and "vspace" attributes of the image element were deprecated in HTML 4.01, and additionally, they are not supported in XHTML 1.0 Strict (however regarding DTD, I use the XHTML 1.0 Transitional) tayiper
__________________
If you want to, please check out my main general personal http://tadejpersic.50webs.com/ website, which is a some sort of a navigational site that basically only describes and lists links to my other websites and blogs. Last edited by tayiper; Sep 14th 2006 at 8:32 pm. Reason: a minor fix |
|
#4
|
|||
|
|||
|
oh sorry, i thought you meant why use CSS instead of HTML :P
|
|
#5
|
||||
|
||||
|
Yes sorry, I indeed did ask in "that kind" od way, lol ...
tayiper
__________________
If you want to, please check out my main general personal http://tadejpersic.50webs.com/ website, which is a some sort of a navigational site that basically only describes and lists links to my other websites and blogs. |
|
#6
|
|||
|
|||
|
SO what you are asking If it matters whetehr certaing tags have to be written before others?
|
|
#7
|
||||
|
||||
|
Quote:
here is a complete list : liorean.web-graphics.com/xhtml/comparison.loose-strict.html |
![]() |
| Bookmarks |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need help with blog CSS vs HTML | Kat2 | CSS | 6 | Aug 1st 2006 12:11 am |
| Need an HTML page converted to CSS. | onemancreative | Programming | 9 | Jun 27th 2006 12:25 am |
| SEO and html, css valid | nikola8 | Search Engine Optimization | 2 | Jun 9th 2006 3:41 am |
| [Looking for HTML / CSS coder] | warlock_cro | Programming | 3 | Mar 21st 2006 6:15 am |
| CSS as important as HTML? | gordonfreeman | CSS | 3 | Feb 21st 2006 9:41 pm |