internel css code example

Example 1: add stylesheet html

<link rel="stylesheet" type="text/css" href="style.css">

Example 2: external css

<html>
  <head>
    <link rel="stylesheet" type="text/css" href="mystyle.css"></link>
  </head>

  <body>

Example 3: internal css

<!DOCTYPE html>
<html>
<head>
<style>
body {background-color: powderblue;}
h1   {color: blue;}
p    {color: red;}
</style>
</head>
<body>

<h1>This is a heading</h1>
<p>This is a paragraph.</p>

</body>
</html>

Example 4: css interne

<head>
 <style type="text/css">
 p {color:white; font-size: 10px;}
 .center {display: block; margin: 0 auto;}
 #button-go, #button-back {border: solid 1px black;}
 </style>
 </head>

Tags:

Html Example