I have the following content in my h1 tag: \"(Hello World)\" so I add the following to my css to change the first character of this element:
h1:first-letter
From the spec:
Punctuation (i.e, characters defined in Unicode [UNICODE] in the "open" (Ps), "close" (Pe), "initial" (Pi). "final" (Pf) and "other" (Po) punctuation classes), that precedes or follows the first letter should be included
So your bracket and the letter H are selected by :first-letter, because ( is considered a punctuation symbol, not a letter.
There are two workarounds:
Wrap your opening bracket in span tags:
(Hello World)
and target h1 span:
h1 span {
font-size: 63px;
color: #510007;
font-family: Helvetica;
}
Drop the brackets from your text:
Hello World
and use :before and/or :after instead (not supported in IE7 and older):
/* To style both (), use h1:before, h1:after */
h1:before {
font-size: 63px;
color: #510007;
font-family: Helvetica;
}
h1:before { content: '('; }
h1:after { content: ')'; }