CSS pseudo-element to apply the first character of an element
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 { font-size:63px; color:#510007; font-family:Helvetica; } But, as I noticed, first-letter is only for letters, so is there any workarounds to apply this style to the first char? Which in this case is "(". 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