Forum Moderators: mack

Message Too Old, No Replies

css in html?

         

knights1

7:00 pm on Jun 24, 2005 (gmt 0)

10+ Year Member



can i use css in html? from what I've read I think I can but i'm not sure.

danec

7:08 pm on Jun 24, 2005 (gmt 0)

10+ Year Member



Sure you can. Do it like this:


<h1 style="color: red; font-size=125%;">My Title</h1>

The content inside the style="" attribute is the CSS.

markbaa

8:48 pm on Jun 24, 2005 (gmt 0)

10+ Year Member



CSS can either be:

embedded in the tag as per the example above
in the head of your html
linked as an external .css file (generally the best option for most people)

knights1

8:55 pm on Jun 24, 2005 (gmt 0)

10+ Year Member



how would i link it? lol maybe i should figure out how to use HTML, then CSS first eh?

markbaa

11:48 pm on Jun 24, 2005 (gmt 0)

10+ Year Member



To be honest, yeah, you probably should.

<link href="/templatestyle.css" type="text/css" rel="stylesheet">

in your head will link it (as an example). However, at the risk of sounding patronising/snobbish, if you don't know how to link it, you probably aren't ready to use it - but then I guess making mistakes is a part of learning!