What is the difference between HTML and CSS?
CSS is the language we use to style a Web page. CSS is used to define styles for your web pages, including the design, layout and variations in display for different devices and screen sizes.
<html>
<head>
<title>HTML Example</title>
</head>
<body>
<h1>Hello, from HTML!</h1>
<p>This is a paragraph. <span>Here's a span</span> inside the paragraph.</p>
</body>
</html>
And some CSS…
body {
width: 700px;
background: lightblue;
}
h1 {
color: darkgray;
}
p span {
background: yellow;
font-family: cursive;
}
Now, you can put CSS inline with HTML…
<span style="background: yellow; font-family: cursive;"> ... </span>
Spread the love
0 Comment