There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply () below.
If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.
Join the Discussion. Help a fellow learner on their journey.
Ask or answer a question about this exercise by clicking reply () below!
Agree with a comment or answer? Like () to up-vote the contribution!
I’m not sure that’s it javapro91079. The specified font-family florafinching is referring to is under the html root element, not a paragraph or heading element.
Interestingly, the “Arial” value of the font-family property, is highlighted in yellow, as are the other type-face, how ever the sans-serif without the double quotes is purple.
I’m guessing this is something to do with the syntax of the font-family property.
Although you can write single-worded font-family value without double quotes, the same is not true for multiple-worded values. For example, to set the font-family property of the body selector to cursive, you can use the following rule:
body {
font-family: cursive;
}
To set it to Courier new, you would need the following rule:
The quotation marks wrapping Arial can easily be omitted with no errors. Font families which consist of one word can be enclosed in quotation marks but don’t need to. Font families which consist of multiple words must be enclosed in quotation marks
Whatever option you choose, you must stay consistent. This means that if you choose to wrap single-worded font families in quotation marks, keep doing so throughout your stylesheet
No. Arial, sans-serif simply means set the font family of the element to Arial. However, if a user doesn’t have the Arial font installed on his machine, set the element’s font family to sans-serif
The only reason Arial is highlited in yellow is because it is a string. Codecademy decided to highlight strings in yellow. This is called color coding. It simply improves readability
What is the difference between something like sans-serif and Helvetica? I’ve heard that sans-serif is a font family while Helvetica is a font belonging to the sans-serif font family. Is that right?
Forgive me if I use the wrong terminology, but when it comes to the CSS properties, is there an order that needs to be followed.
In lesson 1 for typology I added “font-family: Georgia;” to the end of the properties that were already used and it was marked wrong. All I did was cut/paste the line to the top(first after " h1 { " ), and now its marked correct. Why?
Same thing happened to me, it’s confusing as to why it marks it wrong but may be just a bug. There shouldn’t be an order as to where we add the properties. I usually group my properties by type. for example, I group the colors near each other (background-color, color) and font properties near each other (font-family, font-size, font-weight).
The third instruction in the lesson is the following:
In style.css , use a font stack to give the .editorial elements fallback fonts of Times New Roman and serif
However, the previous instruction was to change the font family to a sans-serif font: In style.css , change the font family of the .editorial elements to Trebuchet MS .
So wouldn’t it make sense for the fallback fonts to be a list of similar-looking sans-serif fonts?
Because CodeAcademy glitches sometimes. If you put Serif in quotes it gives you an error, but if you don’t put Georgia in quotes it gives you an error as well, and they’re both single words. I came looking for this same question, thank you.
If that’s not available, it will try to use a similar font, Georgia. And if Georgia is not available, it will try to use Times New Roman.
Well as a developer I am using FOSS… All these fonts are restricted fonts. So someone on Linux, FreeBSD or whatsoever will def. not have those fonts… Wouldn’t it be better to always put (for this matter) ‘serif’ at the end? This should have been a part of the lesson!
The use of quotation marks around font names depends on the context in which you are using the fonts, particularly in CSS (Cascading Style Sheets) for web design. Here are the general rules:
Font names with spaces or special characters: If the font name contains spaces, numbers, or special characters, you should enclose it in quotation marks.
font-family: "Times New Roman", Arial, sans-serif;
Single-word font names: If the font name is a single word without any spaces or special characters, you can omit the quotation marks.
font-family: Arial, Helvetica, sans-serif;
Font names with keywords: If the font name matches a CSS keyword (like inherit, serif, sans-serif, monospace, etc.), you should enclose it in quotation marks to avoid conflicts.