There's an easier way to add the same style to one type of element. We start by adding style
tags inside the head
tags.
<head>
<style>
</style>
</head>
<body>
<h3>List of Pharaohs</h3>
<p>Tutankhamun</p>
<p>Cleopatra VII</p>
<p>Ramses II</p>
</body>
Inside the style
tags, we specify which element to style with a tag selector. Select the p
tag.
<head>
<style>
p
</style>
</head>
<body>
<h3> List of Pharaohs</h3>
<p>Tutankhamun</p>
<p>Cleopatra VII</p>
<p>Ramses II</p>
</body>
When we add p {
followed by font-family: fantasy;
, and then }
, we create a CSS rule.
<head>
<style>
p {
font-family: fantasy;
}
</style>
</head>
<body>
<h3> List of Pharaohs</h3>
<p>Tutankhamun</p>
<p>Cleopatra VII</p>
<p>Ramses II</p>
</body>