HTML. CSS3. Style Placement

There are 3 ways of styling html page

  1. From external file, linking through <link> tag
  2. From <style> tag on the page
  3. From inline <style> tag inside some tag, for example <p>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Style Placement</title>
    <link rel="stylesheet" href="styles.css">
    <style>
        h2 {
            color: maroon;
        }
    </style>
</head>

<body>
<h1>Style Placement</h1>
<h2>Subheading</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</h2>
<p style="text-align: center">I am centered</p>
</body>
</html>
This entry was posted in Без рубрики. Bookmark the permalink.