Reputation: 529
I have a css like
body ,html ,* {
font-family: "MyTest1","MyTest2","Helvetica Neue","Helvetica","Arial",sans-serif !important;
}
How to identify from the above fonts which one the browser rendered the page finally?
Upvotes: 0
Views: 87
Reputation: 8210
A way to log this information in the console would be using window.getComputedStyle()
.
Example:
var text = document.querySelector('.hello-world');
var style = window.getComputedStyle(text)
console.log(style.fontFamily)
.hello-world {
font-family: Verdana, Arial, sans-serif;
}
<p class="hello-world">Hello, world!</p>
Upvotes: 0
Reputation: 1713
You can check it out in Chrome Dev Tools in Elements tab and than at the bottom will be Rendered Fonts.
Upvotes: 2
Reputation: 7161
in browser developer option
available
inspect element
using mouse right click
or F12
function key you can see which font
is apply in Elements option
Upvotes: 1