What are the Types of CSS Structures?

21/12/2020
Welche Arten von CSS-Strukturen gibt es?

What are External CSS, Internal CSS and Inline CSS, which are the structural types of the CSS (Cascading Style Sheet) feature used to give an appearance to the HTML skeletal structure on websites, and in which situations they should or should not be used.

What is External CSS?

External CSS
The External CSS structure is the file containing the CSS elements and classes with the .css extension and is linked to the HTML file with a link. They can be called from multiple pages in the Frond End design.

What is Internal CSS?

Internal CSS

It is the CSS structure used with the classes defined between the <style></style> tags opened after the <head></head> tag, they can only be used on the page they are written on, they cannot be called from other pages.

What is Inline CSS?

Inline CSS

Inline CSS structure is the style structure given directly to a specific tag in HTML. In this structure, CSS only works on the tag it is given, it cannot be called on other tags or affect other tags.

Google does not recommend this structure and says it should be avoided. It even states that CSP broke the content security policy.

Google Source:

https://developers.google.com/speed/docs/insights/OptimizeCSSDelivery#CSSattributes