W3 CSS Validation error for font-face definition

127 views Asked by At

I have following code in my CSS file, which I think is perfectly valid, however W3C-CSS validator shows error as shown in the picture, any idea on how to fix this issue,

@font-face {
    font-family: 'Calibri';
    url('calibri.ttf') format('truetype');
} 

See below for more information.

enter image description here

1

There are 1 answers

0
Subrato Pattanaik On BEST ANSWER

You forgot to add src property to font face.

@font-face {
    font-family: 'Calibri';
    src: url('calibri.ttf') format('truetype');
}