Coloring text

liunx

Guest
I am tyring to color one word out of a Sentence. I want the word Wacky to be red and everything else black.

The sentence is Welcome to Wacky Web Design.


Here is my coding done in dreamweaver.

<html>
<head>

<style>
h1 {font-family:Verdana; font-size:18pt;font-weight:bold; text-align:center;
</style>
<style>
h2 {font-family:verdana; font-size:18pt;font-weight:bold; text-align:center;color:FF0033;}}
</style>

</head>
<body>
<h1>Welcome to<h2>Wacky</h2>Web Design</h1>

</body>
</html>First of all, that is an incorrect use of heading tags. So, I've fixed that, and also fixed the color - you didn't have the # before the hex code.

<style type="text/css">
h1 {
font-family: Verdana, Arial, Helvetica, sans-serif; /*need to specify a default font*/
font-size: 1.5em; /*pt is for print, not the web*/
font-weight: bold;
text-align: center;
}
h1 span { /*use decendant selectors to set the style for the span inside the h1*/
color: #ff0033;
background: transparent; /*should specify a default font*/
}
</style>

</head>
<body>
<h1>Welcome to <span>Wacky</span> Web Design</h1>cool thanks for the help.You are welcome. :)I have another question. I want to put a thin border right below that sentence. i got the border to work, but it goes across the whole page. what is the css codeing make the border shorter than it is?Borders are to be the width of the element, so if you want it smaller, just change the width of the element you are setting it on.ok now i defantley lost, I am trying to get my border line to fit right under neith the sentence right. here is my coding that i have done so far.


<html>
<head>
<style>

h1 {font-family:Verdana; font-size:18pt;font-weight:bold; text-align:center;}
.color {color: #FF0033; font-size:18pt;}

h2 {font-family:verdana; font-size:18pt;font-weight:bold; text-align:center;border-bottom-style:solid;border-bottom-width:thin; padding:.0cm;}

h3 {font-family:verdana; font-size:16pt;text-align:center}
.bold {font-weight:bold;font-size:18}
h4 {font-family:verdana; font-size:16pt;text-align:center}

</style>

</head>
<body>

<h1>Welcome to<span class="color"> Wacky</span> Web Design</h1>
<h2 class="border"></h2>

<br><h3>Get your<span class="bold"> WEBSITE </span>now for $999.00</h3>
<br>
<h4>Features:</h4>
<br>
<h5></h5>
</body>
</html>


Sorry I am brand new to this stuff and I am not learing it very well.
 
Back
Top