I just added a style for an H2 tag like this:
开发者_JAVA技巧h2.section_header
{
color: #1C1C1C;
font-family:gisha,serif;
}
and in my HTML I am trying to reference it like this:
<h2 clas="section_header">Most Popular Problems</h2>
But it does not seem to be changing the color to the one I specified. Any idea what I could be doing wrong?
Thanks!
You mis-spelled class
in the tag.
<h2 clas="section_header"
This has a typo in and should read:
<h2 class="section_header"
The CSS code "font-family" is the right code to style a font/characters.
The other behavior of "font-family" is trying to style the font/characters of your first declared font family which is "geisha". If your computer does not support of that font style. The second declared font family will be used which is "serif".
Sans serif, serif and monospace are the generic font family which is supported to all computers.
精彩评论