Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
My professor said there are three levels/layers of CSS (Cascading Style Sheets). I have no idea what he means is it element type, class and id?
Posted
Comments
Richard Deeming 10-Dec-14 13:48pm    
Ask your professor to explain what he means.

1 solution

As Richard suggest ask the professor for clarification that is what he/she is there for. It's hard to tell what he meant just from your question but he could mean the 3 ways you add CSS.

1. Inline

It is <b style="font-size:16px;">NOT</b> me.

2. In a page header

XML
<head>
<title>MY CSS PAGE</title>
<style type="text/css">
.headlines, .sublines, infotext {font-face:arial; color:black; background:yellow; font-weight:bold;}
.headlines {font-size:14pt;}
.sublines {font-size:12pt;}
.infotext {font-size: 10pt;}
</style>
</head>


3. Linked CSS file

XML
<head>
<title>MY CSS PAGE</title>
<link rel=stylesheet href="whatever.css" type="text/css">
</head>
 
Share this answer
 
Comments
Richard Deeming 10-Dec-14 15:00pm    
It's a good guess, but don't forget the @import option[^]. :)
AnvilRanger 11-Dec-14 11:50am    
Good point.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900