How do you refer to more than one .css file in html?
I have a homepage.html and it refers to styles.css(makes a table). But I also want homepage.html to refer to styles12.css because in styles12.css I have the css for taps.
how would I refer to two .css files?
<title>Testing Css/HTML files</title>
<link rel="stylesheet" type="text/css" href="style.css" />
Can I just make another <link rel="style开发者_如何学Pythonsheet" type="text/css" href="style12.css" />
?
Yes, just add the second bit as you mentioned:
<link rel="stylesheet" type="text/css" href="style12.css" />
you can also use @import
inside other style sheets.
@import url("site.css");
Yes. Just use multiple link elements.
Note, however, that it isn't very efficient and it is generally better to combine all your stylesheets into a single file.
Yes, and the order of precedence for rules will follow the basic CSS precedence ruleset, and later rules overwrite earlier rules if they specify the same attributes.
You might want to read this article on specificity.
could you not just do
<link href="style.css" rel="stylesheet" type="text.class">
would this work for linking more than 1 css page for each web page
<link href="about.css" rel="stylesheet" type="text.class>
精彩评论