Types of CSS (Cascading Style Sheet)
0 3954
Three are three types of CSS (Cascading Style Sheet): CSS is used to define styles for your web pages.
1. Inline Stylesheet
2. Internal Stylesheet
3. External Stylesheet
1. Inline Style Sheet : Inline Style Sheet are used in inline in paragraph
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
</head>
<body>
<p style=" font-family:Arial, Helvetica, sans-serif; font-size:18px; text-align:center; color:#d20404; ">
Welcome to India, Good Morning Have a nice day. Thank you.
</p>
</body>
</html>
2. Internal Style Sheet : Internal Style Sheet are used in <style> element.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<style type="text/css">
body{
background-color:#ddd;
font-family: "Arial, Helvetica, sans-serif";
font-size:18px;
}
</style>
</head>
<body>
<p> Welcome to India, Good Morning Have a nice day. Thank you. </p>
</body>
</html>
3. External Style Sheet : External Style Sheets are stored in CSS files.
<!DOCTYPE html>
<html lang="en">
<head>
<link type="text/css" href="css/style.css" rel="stylesheet">
</head>
<body>
<p> Welcome to India, Good Morning Have a nice day. Thank you. </p>
</body>
</html>
Share:
Comments
Waiting for your comments