Forum Moderators: open

Message Too Old, No Replies

i use inline css code

i use inline css code

         

mert344

7:24 pm on Feb 24, 2016 (gmt 0)

10+ Year Member



Hi everyone.I use inline css code. A lot of people say; inline is worst code algoritma and a lot of people say not bad.I want know one thing. Is this bad for seo ?

[edited by: engine at 9:23 am (utc) on Feb 25, 2016]

[edited by: bill at 12:16 am (utc) on Feb 26, 2016]
[edit reason] Please see WebmasterWorld TOS [/edit]

birdbrain

2:29 pm on Mar 4, 2016 (gmt 0)



Hi there mert344 +,
and a warm welcome to these forums. ;)

The use of "inline CSS" is poor coding practice,
if it is left in the published HTML document. :(

CSS should always be placed in an external file.

As a coding expedient though, it is perfectly OK
to use it whilst compiling the document. :)


birdbrain

Andy Langton

3:22 pm on Mar 4, 2016 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If you're optimising for speed, there's an argument that instead of small external CSS files, you should use inline CSS:

[developers.google.com...]

Similarly, you might do this for page-specific styles, or if you are expecting single-page visits.

tangor

3:27 pm on Mar 4, 2016 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Occasional inline css code for unusual purpose or need is quite okay, but to use it for general formatting is nothing more than code bloat and very inefficient for the creation of content. Off load as much of that inline css to an external css file as possible.

IanM

9:49 pm on Mar 4, 2016 (gmt 0)

10+ Year Member



What if the inline css is generated by php?

birdbrain

10:04 pm on Mar 4, 2016 (gmt 0)



Hi there IanM,
and a warm welcome to these forums. ;)

Why does the PHP need to generate inline CSS when it could just
as easily generate an "id attribute" or a "class attribute" instead?



birdbrain

Andy Langton

10:10 pm on Mar 4, 2016 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



What if the inline css is generated by php?


It should make no difference at all whether PHP creates your CSS (be that inline or external).