You cannot include the font description, with src: ...
, into a style
attribute, since that attribute has special limited syntax.
So you need the @font-face
rule in a style
element or in a linked stylesheet. If needed for some technical reason, you can, in practice, place a style
element right before a p
element; by the specifications, a style
element must appear in a head
element, but in practice it works in body
too.