Website Developer Question:

Download Job Interview Questions and Answers PDF

Tell me which Property Do You Use To Modify The Face Of A Font In CSS?

Website Developer Interview Question
Website Developer Interview Question

Answer:

First of all, please note that both the terms <@font-face> and <font-family> refers to changing the font of an HTML element. However, there is a slight difference between the two.

☛ The <@font-face> is a CSS rule that facilitates the use of custom fonts on a web page.
☛ The <font-family> is a CSS property which specifies the font for a web element.

Also, to change the font or face of a font, we need to set the <font-family> property. Please see the below example.

@font-face {
font-family: myCustomFont;
src: url(sansation_light.woff);
}

body {
font-family: 'myCustomFont', Fallback, Ariel;
}

Download Website Developer Interview Questions And Answers PDF

Previous QuestionNext Question
Tell me in HTML what tag can be used for a multi-line text input control?Please explain what Are Different Types Of Popup Boxes Available In JavaScript?