Internal linking
(1) in to head.
<head>
<style>
body {
background-color:#ddd;
}
</style>
</head>
(2) inline, along with HTML
<h1 style="color:red;"> This is a heading</h1>
External linking
(1) Through HTML (no need to write, type="text/css" in <link> element, in HTML5)
<head>
<link rel="stylesheet" href="style.css" />
</head>
(2) Through CSS itself (no need to write, type="text/css" in <style> element, in HTML5)
<head>
<style>
@import url(style.css);
@import url(good-style.css);
</style>
Also, we can write CSS after @import directive, see below:
<head>
<style>
@import url(style.css);
@import url(good-style.css);
p {
color: #09beba;
}
</style>
</head>
Comments
Post a Comment