robi2, you can't do that but you can do the next best thing...
Use CSS to create styles for <p> and <td>, <tr> tags, they have text in them, so whenever you use a <td>, <tr>, <p>, etc. tag CSS will automaticaly format the text...
This is an example:
The above style will format any text inside any <p>, <td>, <th> tags...
But what if you want some text not to formated like that inside of a <td> tag?? Simple, create a class and call that class in the <td> tag...like this:
The following style created a class called 'somethingelse' and when you call that class it will override what the <th> or <p> style had...
Hope this helps...Forget the Nobel Peace prize, I just want to take over the world!!
robi2, using CSS to define the body style should work as
deecee said, but any text within the BODY tags that has
a different style will use their own styles instead. For
example, using BODY to make all the text black will affect
everything between the BODY tags, but inside that you can
have another SPAN that defines a word to be red. When you
then view the page, you will see that all the text is black
except for that one red word.
The important thing to remember about CSS is that it uses
inheritance. The higher up you go, the less priority the
style has. The most priority will be the lowest level like
this:
<span style="font-size:18px;">Test</span>. While the 'Test'
text will contain all other styles that were imposed on it
from other sources (from P tags, BODY tags, etc) the
one that will always show is the local span one. It will
override all other font-size styles that were defined on
it, because it has more priority.
I hope that makes sense and wasn't too much babbling
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.