css how to code example
Example 1: add stylesheet html
<link rel="stylesheet" type="text/css" href="style.css">
Example 2: external style sheet
<link rel="stylesheet" type="text/css" href="mystyle.css">
Example 3: what is css
Cascading Style Sheets
Example 4: how to add a css file in html
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
Example 5: how to use css
<link rel="stylesheet" href="stylesheet.css">
<div class="mydiv"></div>
<style>
.mydiv {
background-color: ;
color: ;
}
</style>
Example 6: what is css
Q: What is CSS?
A: Cascading Style Sheets is a style sheet language used for defining the
appearance of a text written in a markup language such as HTML. CSS is the
foundation code of the World Wide Web, alongside HTML and JavaScript.