Question
h1 tags all inherit drop shadow
Why do the h1 tags all inherit the drop shadow when I only want the h1 tag with the drop shadow?
<!DOCTYPE html>
<html>
<head>
<style>
/* different fonts and classes */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans&display=swap');
h1.custom { color: green;
font-size: 300%;
}
h1.center { color: orange;
font-size: 200%;
text-align: center;
}
h1 {
margin: 20px;
padding: 0px;
color: red;
text-shadow: 2px 2px 4px #000000;
}
p { color: red;
font-family: 'Open Sans', sans-serif;
font-size: 14pt;
line-height: 1.3em;
text-align: left;
margin: 20px;
padding-top: 5px;
padding-right: 0px;
padding-bottom: 0px;
padding-left: 0px;
}
p.center {
text-align: center;
color: red;
font-size: 120%;
}
p.large {
font-size: 200%;
color: blue;
text-align: center;
}
</style>
</head>
<body>
<h1 class="custom">This H1 is custom size</h1>
<h1 class="center">This H1 heading is centered</h1>
<h1>This H1 heading is default size</h1>
<p class="center">This paragraph will be red and center-aligned.</p>
<p class="large">This paragraph tag is blue, center-aligned, and custom font-size.</p>
<p>Paragraph tag. Default size. <br>Lorem Ipsum is simply dummy text of the printing and
typesetting industry. </p>
</body>
</html>
