1D0-520 · Question #152
You are using a style sheet. Which of the following examples of code are best suited for cross- platform design?
The correct answer is D. font-family: Helvetica, Arial, sans-serif. Exam Questions, Study Guides, Practice Tests. Lead the way to help you pass any IT Certification exams, 100% Pass Guaranteed or Full Refund. Especially Cisco, CompTIA, Citrix, EMC, HP, Oracle, VMware, Juniper, Check Point, LPI, Nortel, EXIN and so on. Our Slogan: First Test…
Question
You are using a style sheet. Which of the following examples of code are best suited for cross- platform design?
Options
- Afont-family: bold, italics;
- Bfont-family=monotype, courier
- Cfont-family: Impact, Verdana, Geneva;
- Dfont-family: Helvetica, Arial, sans-serif;
How the community answered
(16 responses)- A13% (2)
- B6% (1)
- C6% (1)
- D75% (12)
Explanation
Exam Questions, Study Guides, Practice Tests. Lead the way to help you pass any IT Certification exams, 100% Pass Guaranteed or Full Refund. Especially Cisco, CompTIA, Citrix, EMC, HP, Oracle, VMware, Juniper, Check Point, LPI, Nortel, EXIN and so on. Our Slogan: First Test, First Pass. Help you to pass any IT Certification exams at the first try. You can reach us at any of the email addresses listed below. Any problems about IT certification or our products, you could rely upon us, we will give you satisfactory answers in 24 hours.
Topics
Community Discussion
5D is the right answer. font-family: Helvetica, Arial, sans-serif; is the best cross-platform choice because it lists a fallback chain ending with a generic family (sans-serif), so if the first font is not available on the OS, the browser keeps trying until it hits something guaranteed to exist on every platform.
Almost picked C, but D ends with a generic family.
D is your 5-second pick, generic sans-serif fallback saves you on any OS.
D is the right call here, and the reasoning is about fallback order. When you write font-family: Helvetica, Arial, sans-serif; the browser works left to right through that list and picks the first font the user's system actually has installed. Helvetica lives on Mac and many Linux systems, Arial is standard on Windows, and sans-serif at the end is a generic family that every browser on every platform is required to support, so you always get something readable no matter what. The other options either have syntax errors (B uses an equals sign instead of a colon, and A lists bold and italics which are font-style values, not font families) or stick to fonts that are less universally available without a reliable generic fallback at the end. On my actual exam I flagged this one and came back to it, because option C looked tempting since Impact and Verdana are both real fonts. But I reminded myself to check for that generic family keyword at the end, and C does not have one, so if neither of those fonts is installed you are at the browser's mercy. Once I thought about it that way, D was obvious. Always end your font stack with a generic family, serif, sans-serif, or monospace, and you will cover every platform.
I honestly glanced at C first because listing three font names felt thorough, but Impact and Geneva are notoriously absent on many Linux and older mobile systems, which kills true cross-platform reliability. D wins because it pairs Helvetica (Mac) with Arial (Windows) and then falls back to the generic sans-serif keyword, giving the browser a guaranteed catch-all no matter the OS.