Thread: Html

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    1
    Rep Power
    0

    Html


    i am making css in html please i do no know class and dive please any one person help me in class and dive.
  2. #2
  3. Code Monkey V. 0.9
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2005
    Location
    A Land Down Under
    Posts
    2,118
    Rep Power
    1990
    Code:
    <div class="class_name">Div content goes in here.</div>
    There you go. There's a div with a class set. Anything else?
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2009
    Posts
    677
    Rep Power
    7
    I'd define them kinda like:

    DIV is a highlighter.
    CLASS is a title/definition

    Odd example. You have 15 people. You use your DIV tag to highlight the 1st, 2nd, and 3rd groups of 5 people. Your document now holds 3 open/close DIV tags. Now, within your DIV tags, you define their CLASS. 1st being class="TeamA" and 2nd being class="TeamB". This, within your stylesheet, you can now define TeamA as the Red team, so all text will appear Red. TeamB being Blue team, all text Blue. 3rd class can be class="Audience" and defined as Bold/Italic.

    Sorry for the odd example, but just saying DIV selects the area/items you wish to define in a preset manner.

    EDIT: This helps you make a single set of definitions with multiple attributes you may use in many instances around your site, without having to duplicate and reassign the attributes per instance.

IMN logo majestic logo threadwatch logo seochat tools logo