Types of CSS

Types of CSS


  • Inline style
  • Internal style sheet
  • External style sheet


Inline style

<tag_name style=“Property_Name:Value; “>

Example:

<P style=“Font-size:18px;”>
text
</p>
Internal style sheet

<head>
<style type="text/css">
selector{
Property : value;
Property : value;
}
</style>
</head>

Example:

<html>
<head>
<style type="text/css">
h1 {color: green}
h2 {color: #dda0dd}
p {color: rgb(0,0,255)}
</style>
</head>
<body>
<h1>This is header 1</h1>
<h2>This is header 2</h2>
<p>This is a paragraph</p>
</body>
</html>
External CSS:

Create a .css file that contain the only css script and link it into .html or . php page based on requirement.

<head>
<link type=”text/css” rel=”stylesheet” href=”css_filename.css”>
</head>

Example:

File name Style.css

P
{
Color:red;
}

Html file:

<html>
<head>
<link type=”text/css” rel=”stylesheet” href=”style.css”>
</head>
<body>
<p>cs-tutorial is a best website for html tutorial</p>
</body>
</html>

Programs

Write a HTML code using CSS to create a job application form having following details

View Solution


CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Website development Company in Allahabad Sarkari Exam Quiz