My style.css file has the following code:
body{
background-color:pink;
font-size: 130%;
}
This is the code in my style_placement.html file:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Style Placement</title>
<link rel='stylesheet' href="style.css">
<style>
h2 {color:maroon}
</style>
</head>
<h1>Style Placement header</h1>
<p>This is heading one</p>
<h2>Subheading 1</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ex et similique cupiditate dignissimos delectus nulla dolore, eos dolorum quidem excepturi, facere non repellat accusamus, atque? Id voluptate eos et accusantium.</p>
<h2>Subheading 2</h2>
<p style='text-align:center'></p>
</html>
Although I am not using the body tag in my HTML file, the styling for that tag has been applied. Can someone please help me understand what is happening behind the scenes? Below is a screenshot of how the output appears in a web browser: https://i.sstatic.net/xCOjV.png