In what order does css picks the alternative font what if all the specified fonts are available | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

In what order does css picks the alternative font what if all the specified fonts are available

28th Feb 2018, 6:57 PM
Ayodele Abigail Oluwabunmi
Ayodele Abigail Oluwabunmi - avatar
8 Answers
+ 1
In that particular case, when fonts are in the same line, applies the first, if it doesn't exist or something goes wrong, uses the one that follows and so. Sorry for the confusion, I misunderstood your question
28th Feb 2018, 8:19 PM
voidneo
+ 5
the next lesson explained further that it picks the ist one then the next then the next etc...thanks
28th Feb 2018, 7:09 PM
Ayodele Abigail Oluwabunmi
Ayodele Abigail Oluwabunmi - avatar
+ 5
@noname you reply is contradicting the lesson, below is the explanation that made me concluded at my answer the example was if i specified a group arial, helvetica neue, helvetica If the browser does not support the font Arial, it tries the next fonts (Helvetica Neue, then Helvetica). If the browser doesn't have any of them, it will try the generic sans-serif. now am confused as to who is correct, would experiment n reply back
28th Feb 2018, 7:18 PM
Ayodele Abigail Oluwabunmi
Ayodele Abigail Oluwabunmi - avatar
+ 5
@noname i modified the cold so to explain my question so which font is it using? cause i dnt really kw what those font are supposed to look like. https://code.sololearn.com/Wz0XZm2Wru24/?ref=app
28th Feb 2018, 8:10 PM
Ayodele Abigail Oluwabunmi
Ayodele Abigail Oluwabunmi - avatar
+ 4
@noname no need for the sorry but your answer also thought me more....thanks a lot am Abigail you?
28th Feb 2018, 8:22 PM
Ayodele Abigail Oluwabunmi
Ayodele Abigail Oluwabunmi - avatar
+ 2
Css always picks the last attribute applied, if any of those has the !important argument, picks that one. If there's more than one important argument always picks the last one applied.
28th Feb 2018, 7:00 PM
voidneo
+ 2
Both answers give the same result, if css picks the first, then the next and so on, it always ends up using the last one you applied: here, I made you this example https://code.sololearn.com/WZCihXBde7jn/?ref=app
28th Feb 2018, 8:01 PM
voidneo
+ 1
Don't mind me i'm just trying to get an achievement reward.
24th Jul 2020, 6:28 PM
bereket girma zewdie
bereket girma zewdie - avatar