Including CSS: Internal Styles
There are several ways to include CSS in an HTML document. One way to include CSS in an HTML document is to use the <style>
element.
index.html
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<html>
<head>
<style>
p {
font-size: 14px;
color: red;
}
</style>
</head>
<body>
<p>The paragraph is styled now!</p>
</body>
<html></html>
</html>
The advantage of using the
<style>
element is that it allows you to define styles that apply to the entire document in one place;The disadvantage is that it can make your HTML document challenging to read and maintain since all your styles are mixed in with your HTML code.
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 1. Capítulo 2
Pergunte à IA
Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo