Forum Moderators: not2easy

Message Too Old, No Replies

What are types of CSS?

         

ChiragDave

10:10 am on Jan 19, 2015 (gmt 0)



I am trying to learn HTML. Can somebody explain the types of CSS? I know about inline but I heard there are more.

not2easy

4:07 pm on Jan 19, 2015 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Hi ChiragDave and welcome to the forums. As a new member you may not yet be familiar with the layout of the forums but at the top of each Forum there is a link to the Charter and Library for that forum where you can find information to answer basic questions such as this. Take a moment to visit the Charter here: [webmasterworld.com...] and your question is answered in detail, with resources to read more.

I hope if you ever run into a css problem that you will find this a useful place to get it resolved.

lucy24

9:57 pm on Jan 19, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I know about inline but I heard there are more.

I think you're referring to the location of individual styles:

inline: HTML
<p style = "font-size: 130%;">


internal stylesheet:
CSS within
<style>
tags in document head:
p.super {font-size: 130%;}

HTML:
<p class = "super">


external stylesheet:
same, except that CSS is a separate document called by
<link rel="stylesheet">
in document head

So "inline CSS" is a bit of a misnomer, since the whole point is that you're not referencing a stylesheet (Cascading Style Sheet = CSS). Putting styles inline is very, very rarely necessary or appropriate.

tangor

3:15 am on Jan 20, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



CSS is pretty simple. It is a Cascade Style Sheet, a set of instructions, generally display and layout related, that resides in a separate page that is linked to a web document. The secondary function of a CSS file is to reduce the overhead for web pages that make use of the CSS instructions (tag attributes), and allows SITE WIDE changes without having to change individual web pages.

Anything that can be done in html can be dome from a CSS linked instruction set. In recent years CSS has come to mean any kind of markup/layout for html pages.

CSS is generally used to DEFINE the display/layout of HTML TAGS.

Learn the TAGS first. Then learn CSS. Can't model a tag from a CSS page unless you know its attributes.