Cascading Stylesheet is used to describe the style of HTML document.

CSS Example:-

h1{
text-align:center;
color:#fff;
}
p {
  font-size: 20px;
 font-family: arial;
 }

Types of CSS

  • Internal CSS
  • External CSS
  • Inline CSS

Internal CSS

Internal CSS is use between the section of <head>.. </head> with the <style> </style> tag.

Example:-

<html>
<head>
<title>Internal CSS</title>
<style>
p{
color:#fff;
font-size:20px;
text-align:center;
}
</style>
</head>
<body>
<p>Welcome to Hub of Tutorials</p>
</body>
</html>

External CSS

External CSS use with the link. HTML DOcument will be linked with the css file.

Example:-

document.html

<html>
<head>
<title>External CSS</title>
<link rel="stylesheet" type="text/css" href="external.css"/>
</head>
<body>
<p>Welcome to Hub of Tutorials</p>
</body>
</html>

external.css

p{
color:#fff;
font-size:20px;
text-align:center;
}

Inline CSS

Inline CSS use in any tag with the property of style.

Example:-

<html>
<head>
<title>Inline CSS</title>
</head>
<body>
<p style="color:#fff;font-size:20px;text-align:center;">Welcome to Hub of Tutorials</p>
</body>
</html>

You May Also Like:-How to Play Audio on Web Browser

You can check on Facebook