Types of CSS in HTML Tutorial | Types of CSS Selectors
×

Types of CSS (Cascading Style Sheet)

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>


Best WordPress Hosting


Share:


Discount Coupons

Get a .COM for just $6.98

Secure Domain for a Mini Price



Leave a Reply


Comments
    Waiting for your comments