Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
05-08-2009, 06:44 PM #1
- Join Date
- May 2009
- Thanked 0 Times in 0 Posts
css tags and attributes what are they used for
im working on ccs and i am not to sure what the following tags and arrtibutes are used for or what they are. can someone please help me and and explain? i have looked at several websites but still no clue. the websites use the css files using it but never go into detail of what they are
05-08-2009, 07:26 PM #2
- Join Date
- Oct 2008
- Some say it's everything.
- Thanked 397 Times in 390 Posts
You use style inside of the HTML file (never in the external CSS file). You place this "attribute" inside of the <tag> you want to style. This is used for what is called "in-line CSS" and it is implemented like this:It's mostly useful during development but you should remove it wherever possible from finished products and style elements in the external CSS using ID's and classes instead.Code:<div style="background-color:yellow;color:red;">...</div>
Link is a <tag> of its own, just like div, ul, li, and so on. It is used in the HTML to link other items to the current document and requires two other items in your list, so I will wait until then to post the example code. Most often, link <tags> are used to associate an external CSS file to style the elements of the current page.
Ok, this is an "attribute" used for link <tags> and it tells the browser what the relationship is of the linked item to the current HTML document. Most commonly you will see this for external CSS files. The combined link and rel code usually looks like this:A good place to find answers and examples of these and other issues is at http://www.w3schools.comCode:<link rel="stylesheet" type="text/css" href="http://www.xxxxxxxxx.com" />
The object of opening the mind, as of opening the mouth, is to shut it again on something solid. –G.K. Chesterton
See Mediocrity in its Infancy
It's usually a good idea to start out with this at the VERY TOP of your CSS:
Seek and you shall find... basically: validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting