Reputation: 977
I'm working on project where I have to define font-family for the whole project and then I got a question in my mind that Which way is good to define font-family
in my stylesheet?
Like this
*{
font-family: sans-serif,Verdana, "Trebuchet MS";
}
or
Like this
body{
font-family: sans-serif,Verdana, "Trebuchet MS";
}
Upvotes: 1
Views: 163
Reputation:
body
is better.
I would actually use:
html{
font-family: sans-serif, Verdana, "Trebuchet MS";
}
Whether you use html
or body
, it does not really matter, but I have seen html
more often
The universal selector (*
) is extremely slow. It would be like finding every possible type of html tag and giving each of those the rule seperately
Upvotes: 1