Jump to content
xisto Community
solankyno1

Css Or Html Tags Which is better to use????

Recommended Posts

The key thing to remember is that the css will save you enourmous amt of time as far as maintainability. It's also quite simple, so it's worth having a look. Really no benefits of marking with html, other than if you have a 1 page website.

Share this post


Link to post
Share on other sites

USE CSS as outside link, like in <head> section:<head<link href="index.css" rel="stylesheet" type="text/css"></head>Then I open new file i editor called index.css:body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; background-color: #dddddd; background-image: url(background.gif);}.myowntag {font-family: Verdana, Arial;font-size: 12 pt;font-weight: bold;}here i apply new setting for predefined TAGS or for my own defined tags.This CSS I link in <head> section on every HTML document, and with thati get ONE CSS DEFINED FILE for changing design for whole set of pages of webpage...to apply specific CSS use inexample:<p class="myowntag"> blablabla </p>That's the best way to use CSS and the right way, because with this your webpage is fully optimized to not use it on evry document, but to define it ONCE and use it evrywhere and always...

Share this post


Link to post
Share on other sites

guys, you cant really compare CSS to HTML, i use both of them in the same page, you basically have to use HTML if you use CSS. its not like comparing HTML to ASP or PHP to ASP or anything like that. i only use CSS cuz its easier to change things, so if u have a table and u want to change the color of all the text, you wouldnt have to go to each cell and type <font color>, in the CSS u could just go td {color:COLOR} and there u have it

Share this post


Link to post
Share on other sites

i go with html but they go togethjer so you can use which ever borttum one gives you more choices of what your font looks liek and siz and even color not sure if that was html or css i didn't really look at that so sry but yah 2nd one harder to use and remember but top is esayer to rember but not as cool. so there you have it

Share this post


Link to post
Share on other sites

I have started this thread for help regarding HTML or CSS. Now I am using CSS easily in my website http://forums.xisto.com/no_longer_exists/ . CSS is very easy to use if you have a lot of pages in your site like mine. When I was using inline styles I was having a lot of problem in changing styles on every page. But now I am using external style sheets and this is extremely easy to use. Just make change in one file and all the pages are changed. Wow .....

Share this post


Link to post
Share on other sites

i use CSS and HTML on my pages writing the span tag everytime you would want a bold text is really annoying :P i prefer to use the <b> </b> tags anyway why don't u try to use the CSS? the are really practic and comfortable to use instead of changing every page you can change only 1 (well.. if u used the external ) i'll leave you a page for CSS tutorials i hope u read it http://forums.xisto.com/no_longer_exists/

Share this post


Link to post
Share on other sites

I use CSS for everything it is possible to use it for! I can't see why anyone WOULDNT want to use it on their site. Cascading Style Sheets were introduced to provide cleaner, shorter coding and that is exactly what it does... Some people say its not "backwards compatible", but I mean, at the end of the day if you use an outdated browser its your fault really.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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}

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.