New Posts
Home / Web Designing / CSS / How to Use Embedded Style Sheet.

How to Use Embedded Style Sheet.

How to Use Embedded Style Sheet.

Embedded Style Sheet or Internal style sheet is same and it is used when there is a single document has a unique style. We define an internal styles sheet in the head section of HTML.

Embedded Style Sheet

This is usually referred to as an embedded style. Embedded styles only apply to the documents they’re found in, which make them inefficient for site – web styling, but perfect for targeted styles that are specific for that page.

My mean that if we use the same style with more than 50 pages then we need 50 pages this is the drawback of this style. (So, use external style) inline and embedded styles are not good for large pages and entire site.

The purpose of to give embedded2 to explain that you can copy the style from one file to another but think if there are 100 or more than 100 pages then you have to copy 100 or more than 100 times.

It is better than inline style.

My mean that if we use the same style with more than 50 pages then we need 50 pages this is the drawback of this style. (So use external style) inline and embedded styles are not good for large pages and entire site.

 Embedded Style example

Embedded Style Sheet.

<!doctype html>

<html>

<head>

<title>Using embedded styles</title>

<style>

body{

       font-family:Arial;

}

p{

       font-size:16px;

       color:green;

}

div p{

       font-style:italic;

       font-size:14px;

}

</style>

</head>

<body>

<h1>This is a heading one</h1>

<p>Paragraph text, below the heading one</p>

<div>

<h2>This heading two is inside a div tag</h2>

<p>This paragraph is inside the div tag as well</p>

<p>Additional paragraph content</p>

</div>

</body>

</html>

Embadded Two.

<!doctype html>

<html>

<head>

<title>Using embedded styles</title>

<style>

body{

       font-family:Arial;

}

p{

       font-size:16px;

       color:green;

}

div p{

       font-style:italic;

       font-size:14px;

}

</style></head><body>

<h1>This is a heading one</h1>

<p>Paragraph text, below the heading one</p>

<div><h2>This heading two is inside a div tag</h2>

<p>This paragraph is inside the div tag as well</p>

<p>Additional paragraph content</p>

</div>

</body>

</html>

 

About imran

My Name Mohammad Ramzan Bhutto. Live in District Jacobabad, Sindh, Pakistan. I have started blogging on Information Technology, my selected areas are Online Business, Digital Marketing, Make Money Online.

Check Also

External Style Sheet

How to Use External Style Sheet. 

How to Use External Style Sheet. An External style sheet is simply texting files with …