Social Sciences, asked by sharmabhumi170, 8 months ago

2. Differentiate between Internal Style Sheets and Inline Style Sheets.

Answers

Answered by expertgenius1st
9

Answer:

An internal stylesheet holds CSS rules for the page in the head section of the HTML file. ... Again, a single change to the CSS rule will apply to all tagged elements on the page. Inline styles relate to a specific HTML tag, using a style attribute with a CSS rule to style a specific page element.

Answered by Yashraj2022sl
2

Answer:

What is internal style sheet?

The head section of the HTML file has an internal stylesheet that contains the CSS rules for the page. Although you can set up CSS classes and IDs to style various elements in the page code, the rules only apply to that particular page. Once more, a single modification to the CSS rule will affect every marked page element.

What is inline style sheet?

The phrase "inline style sheets" describes style sheet information that is applied to the current element. By this, I mean that you only apply the style to the instance you want it to apply to, as opposed to defining the style once and then applying it to all instances of an element (let's say the p> tag). Inline styles would be a more suitable term because it's not actually a style sheet as such.

Now, the difference between  Internal Style Sheets and Inline Style Sheets are:

In Inline style sheet -

Inside the precise tag that you want to style, inline is used.

Like this:

<p style=”text-align:center;”>welcome</p>

The majority of the time, this is not helpful because you must copy and paste the sample style into another element if you wish to style it in the same way. Therefore, reading the HTML will become more difficult.

In Internal style sheet -

Using the style>/style> element, internal style is written inside the head tag. This design can be used again. Create a class or id attribute to achieve that. Instead of id, use class to style two or more tags. id only applies to one element, for this reason.

Like this:

<html>

<head>

<style>

.cls {text-align: center;}

</style>

</head>

<body>

<p class=”cls”>welcome</p>

<p class=”cls”>brainly</p>

</body>

</html>

Main difference between Internal Style Sheets and Inline Style Sheets is the style is repeated twice in this passage. It will make things simpler. in contrast to inline.

#SPJ2

Similar questions