I'm new in IT and I'm learning CSS now.
And sorry for probably a stupid question, which might have been asked already many times - but I've been trying to find the answer for about two or three hours myself, but it didn't work out. So I decided to ask the question here.
I'm trying to understand how to define custom fonts in css file. And that's what I have:
@font-face {
font-family: "Christmasscript";
src: url("fonts/christmasscriptc.ttf") format("truetype");
}
h1 {
font-family: "Christmasscript", sans-serif;
}
And it works perfectly.
But if I don't specify the format:
@font-face {
font-family: "Christmasscript";
src: url("fonts/christmasscriptc.ttf");
}
it also works.
So my question is - when should I specify the format? This case shows that "format" property is not always required to make things work. But if this proeprty exists, it must be needed in some cases, right? Could you help me please?