tags:

views:

24

answers:

3

How do i give default color for text in html ? To explain more in detail...We have dreamweaver or notepad++ or dojo tools or visual studio or any other tool...when we start typing anything..by default it gives color for specified text..Another good example is stack overflow..when some one asks a question...there will be blue color for some text and red for some text and so on...
same like that,i have an web page where when user clicks a button, a message pops up with some html code..so for tags like its should represent one color and content text should be in other color.
hoe do i go about this.?

Thanks in advance

Thanks for reply..Currently we have 5 to 10 lines of html code..but in future as per requirement we might have 1000 or more lines of code..so for each tag i nned to css class ?

A: 

You need to learn CSS and HTML. Look for "CSS color" property.

An example of changing a div font color is RED TEXT

Hope that helps.

Yasen Zhelev
+1  A: 
VoteyDisciple
Responding to your latest edit, you do not need a separate CSS rule for every tag on your page. The rule I defined for `p { ... }`, for example, affects **every** `<p>` tag on the page.
VoteyDisciple
A: 

What you can do is have a master css file and include it in all your html pages. In the master css file you define all your html tags so that they represent what you want the users to see. Once you include the master css file in your html page, it will look same as your other pages. This way you dont need to write css in all the files. You will just need to add a link attribute to all your html files.

<LINK href="master.css" rel="stylesheet" type="text/css">
tHeSiD