css tags are better to use. after some time you will find html tags almost useless. css rules
| |
|
Welcome to KnowledgeSutra - Dear Guest | |
Css Or Html Tags
Started by solankyno1, Oct 16 2004 04:21 PM
28 replies to this topic
#28
Posted 27 May 2011 - 07:57 PM
CSS is much better to use. You could however have inline styles using Javascript (eg. element.style.width = "100px"). Inline styles have preference over CSS unless you use "!important" with the style. The html tags are usually for quick editing or if you don't want to add cluttered up classes, attributes to files such as <b>, <i> though it is preferable to use <span class='bold'> than <span style='font-weight:bold'> and <b>. The major advantage to use CSS instead of inline html styles is that you can change change all the element's styles that associate with that CSS rule, but inline styling is much easier to handle with Javascript.
#29
Posted 03 June 2011 - 08:27 AM
Well, in html4 you can use <b> <i> tags and etc. but I personally use xhtml for most of things and use the <strong> tag to make my html document, but still in the CSS file I just write what a strong tag means and how ti needs to show it, in xhtml as I know <b> tag is deprecated and not valid, but ion html5 it's a valid tag again, so you can use it without problems..
the tags in HTML document displays your markup and use CSS how you want to display that html document, as it's much better to use <strong> and later in CSS classify the strong tag how you want it to be displayed in your layout rather than using <span class="bold"> or <div class="bold"> and in the CSS file .bold {font-weight:bold}
the tags in HTML document displays your markup and use CSS how you want to display that html document, as it's much better to use <strong> and later in CSS classify the strong tag how you want it to be displayed in your layout rather than using <span class="bold"> or <div class="bold"> and in the CSS file .bold {font-weight:bold}
Reply to this topic

1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users













