Subscribe Us

banner image
banner image

Cascading Style Sheets (CSS) and type of CSS | Advantages and Disadvantages of CSS

CSS

CSS stands for Cascading Style Sheets. It is a style sheet language which is used to describe the look and formatting of a document written in markup language (HTML, XML). It also provides an additional feature to HTML. It is mainly  used with HTML to change the style of web pages and user interfaces. It can also be used with any kind of XML documents including plain XML, SVG and XUL.


CSS



Advantages of CSS

  • Easy for the user to customize the online page
  • It reduces the file transfer size.
  • Time-Saving
  • It is less complex therefore the effort are significantly reduced.
  • Positioning of Design Elements
  • It helps to form spontaneous and consistent changes.
  • Better Website Speed For a website to function efficiently, it should have a faster load time. 
  • Better Device Compatibility
  • CSS is easy to maintain due to less maintenance time. This is because a single line code change affects the entire web page. Also, if improvements are required, then less effort is required to affect changes in the webpage code.
  • You would have seen many websites that are elegant and user-friendly. CSS enables developers to ensure the style elements are applied consistently across several web pages.


Disadvantages of CSS

  • There might be cross-browser issues while using CSS.
  • Security Issues
  • Extra Work for Developers
  • Confusion due to many CSS levels
  • Cross-Browser Issues
  • There are multiple levels which creates confusion for non-developers and beginners.

CSS Types

There are three types of CSS which are given below:

1.Inline CSS

2. External CSS

3. Internal/ Embedded CSS


1. Inline CSS: Inline CSS contains the CSS property in the body section attached to the element is known as inline CSS. This kind of style is specified within an HTML tag using the style attribute.


2. External CSS: In external CSS, we link the web pages to the external .css file. It is created by text editor. The CSS is more efficient method for styling a website. By editing the .css file, we can change the whole site at once.

3. Internal or Embedded CSS: This can be used when a single HTML document must be styled uniquely. The CSS rule set should be within the HTML file in the head section i.e. the CSS is embedded within the <style> tag inside the head section of the HTML file.


Cascading Style Sheets (CSS) and type of CSS | Advantages and Disadvantages of CSS Cascading Style Sheets (CSS) and type of CSS | Advantages and Disadvantages of CSS Reviewed by Sarvgya on June 17, 2023 Rating: 5

No comments:

Powered by Blogger.