forum_image

Discussion Forum

Interative Forum for discussing any query literally to UGC-NET Computer Science, GATE Computer Science and Computer Sciene and Technology in general.

ugc_net image

UGC-NET Computer Science

Correspondence Courses and Test Series to prepare for UGC-NET computer science and applications

GATE image

GATE

MCQs, Lecture Notes, Ebooks for GATE preparation

freestuff image
jobs image

Jobs Newsfeed

Timely information of various Recruitments.

NextPrev

Inline Stylesheets

Inline Style Sheet Advantages:
Inline CSS can be used for many purposes, some of which include:

  1. Testing: Many web designers use Inline CSS when they begin working on new projects, this is because it’s easier to scroll up in the source, rather than change the source file.
  2. Quick-fixes: There are times where we would just apply a direct fix in your HTML source, using the style attribute, but you would usually move the fix to the relevant files when we are either able, or got the time.
  3. Smaller Websites: The website such as Blogs where there are only limited number of pages, using of Inline CSS helps users and service provider.
  4. Lower the HTTP Requests: The major benefit of using Inline CSS is lower HTTP Requests which means the website loads faster than External CSS.
  5. It is ideal for situations when the style is to be applied only on single element within the entire webpage.
  6. It has the highest priority from all the methods available for applying stylesheets.
Disadvantages Inline CSS some of the disadvantages of which includes:
  1. Overriding: Because they are the most specific in the cascade, they can over-ride things you didn’t intend them to.
  2. Every Element: Inline styles must be applied to every element you want them on. So if we want all your paragraphs to have the font family “Arial” we have to add an inline style to each tag in our document. This adds both maintenance work for the designer and download time for the reader.
  3. Pseudo-elements: It’s impossible to style pseudo-elements and classes with inline styles. For example, with external and internal style sheets, we can style the visited, hover, active, and link color of an anchor tag. But with an inline style all we can style is the link itself, because that’s what the style attribute is attached to.
  4. It cannot be used to apply styles on multiple web pages at once.
  5. Also same inline property cannot apply to multiple occurrences of that element in a webpage.




    Return To HTML Topics