这是带有标记的CSS样式。现在我想了解样式如何与HTML一起使用。
<!DOCTYPE html>
<html>
<head>
<title>Internal CSS</title>
<style>
.main {
text-align:center;
}
.GFG {
color:#009900;
font-size:50px;
font-weight:bold;
}
.geeks {
font-style:bold;
font-size:20px;
}
</style>
</head>
<body>
<div class = "main">
<div class ="GFG">GeeksForGeeks</div>
<div class ="geeks">A computer science portal for geeks</p>
</div>
</body>
</html>
你一定要看看https://www.w3schools.com/css/default.asp(这是我如何学习我现在知道的关于html的一切)。您的代码如何工作的简要说明是您可以使用类似的创建样式
.GFG {
color:#009900;
font-size:50px;
font-weight:bold;
}
你复制了,你可以把它们称为文本类型
<p class = "GFG">Hello World!</p>
他们将以所选的风格输出。祝好运!