Internal CSS
~10 mins
Internal CSS
- CSS enclosed in
<style></style>tags within an HTML document functions like an external stylesheet, except that it lives in the HTML document it styles instead of in a separate file, and therefore can only be applied to the document in which it lives.
<head>
<style>
h1 {
color: green;
}
</style>
</head>
<body>
<h1>Hello world!</h1>
</body>
- Reference: Section 1.2