- 1). Create a blank file inside a code-editing program and save it as a CSS file, if your website does not already have a style sheet. Open the file for every Web page in your website inside the editor. Add <link> tags to include in your CSS file:
<link rel="stylesheet" type="text/css" href="/links/?u=path-to/your/stylesheet.css" />
If your pages already contain similar code, then skip this step. - 2). Open the CSS file for your website and start a new line at the end of the document. Add the following code:
strong {color: #ff0000;}
This CSS code will change every instance of the <strong> tag to red, so all text between <strong> tags will appear red. Change the color code to the code of a color you want to use. Replace "strong" with "b" if your site uses <b> tags to make text bold. Save the CSS file. - 3). Load your website in a browser, then check to see if the bold text is displaying in your chosen color. If some bold text is not the right color, go back to your CSS file and change it to look like this:
strong {color: #ff0000 !important;}
Your site may already have styles set for bold text in another part of the CSS file, or directly in the HTML tag. So-called "inline styles" applied directly to tags in the HTML file are given preference by the browser, hence the term "cascading." The "important" declaration will override all other CSS rules.
previous post
next post