Inline versus External CSS

E

e n | c k m a

I have a friend who I'm doing web sites with now that was complaining about
me not letting him add inline styles to the HTML.

I tried explaining that it's less code and cleaner HTML if we use external
style sheets.

He brings up the point of having to do more look-ups to the external file.
I personally think he's being silly because even if it is doing another
look-up to the external CSS file, it wouldn't be noticable.

What's does everyone else think?

Thanks,
Nicko.
 
S

Spartanicus

e said:
I have a friend who I'm doing web sites with now that was complaining about
me not letting him add inline styles to the HTML.

I tried explaining that it's less code and cleaner HTML if we use external
style sheets.

He brings up the point of having to do more look-ups to the external file.
I personally think he's being silly because even if it is doing another
look-up to the external CSS file, it wouldn't be noticable.

This is a known issue with friend v1.21 or earlier, upgrade to friend
v1.4+.
 
N

Nico Schuyt

e said:
I have a friend who I'm doing web sites with now that was complaining
about me not letting him add inline styles to the HTML.
I tried explaining that it's less code and cleaner HTML if we use
external style sheets.
He brings up the point of having to do more look-ups to the external
file. I personally think he's being silly because even if it is doing
another look-up to the external CSS file, it wouldn't be noticable.
What's does everyone else think?

It depends on the frequency the CSS-code is applied:
For more pages: external
Only for one page: internal
A small adjustment somewhere on a page: inline
By doing this you keep your coding clean and readable.
Nico
 
J

Jukka K. Korpela

e n | c k m a said:
I have a friend who I'm doing web sites with now that was
complaining about me not letting him add inline styles to the HTML.

Try telling him that it's the 2000's now and everybody should use the
modern XCSS (eXternal CSS) technology.

Or try saying "I heard that a large company will buy our site if we
change its visual appearance so that the user can select between three
'skins'. How can we do that?" (It's a bit cheating, since style sheet
switching works poorly at present. But it has no chance of working when
embedded styles are used. Well, not quite, but let's not be excessively
honest.)
I tried explaining that it's less code and cleaner HTML if we use
external style sheets.

If you have no better arguments, maybe you could agree on his using
inline styles once in a while.
He brings up the point of having to do more look-ups to the
external file. I personally think he's being silly because even if
it is doing another look-up to the external CSS file, it wouldn't
be noticable.

It's not really a lookup. The browser will read the external style
sheet(s) and use it (or them). When the same style sheet is used, via
<link>, on several pages of a site, the browser will most probably
use the copy it has already got. If the style sheet is large, this has
a positive impact on efficiency as compared with reading it over and
over again as part of HTML documents.
 
T

Toby A Inkster

e said:
He brings up the point of having to do more look-ups to the external file.
I personally think he's being silly because even if it is doing another
look-up to the external CSS file, it wouldn't be noticable.

If a style is only being used on the one page, it is more efficient to put
it in a a <style /> element or in @style.

If a style is being used on multiple pages, it is more efficient to put it
in an external style sheet.

Of course, it is most elegant to put everything in an external style sheet.
 
B

brucie

I have a friend who I'm doing web sites with now that was complaining about
me not letting him add inline styles to the HTML.

I tried explaining that it's less code and cleaner HTML if we use external
style sheets.

He brings up the point of having to do more look-ups to the external file.
I personally think he's being silly because even if it is doing another
look-up to the external CSS file, it wouldn't be noticable.

What's does everyone else think?

i think your friend is new to CSS and has limited knowledge of HTML. he
probably uses a WYSINWYG. he is more conformable using CSS inline
because thats how it was done with HTML. hes just coming up with what he
considers plausible reasons to justify his use of inline CSS. give him a
few months and he'll quietly change to external CSS as he becomes more
comfortable with it.
 
E

e n | c k m a

I tried explaining that it's less code and cleaner HTML if we use
If you have no better arguments, maybe you could agree on his using
inline styles once in a while.

Yeah and I have once or twice already but it for what he wanted to do, it
would've made more sense to use a class.
 
E

e n | c k m a

i think your friend is new to CSS and has limited knowledge of HTML. he
probably uses a WYSINWYG. he is more conformable using CSS inline
because thats how it was done with HTML. hes just coming up with what he
considers plausible reasons to justify his use of inline CSS. give him a
few months and he'll quietly change to external CSS as he becomes more
comfortable with it.

I think you're right - we had a heated discussion before also about using
JavaScript for a functional part of the site. I wouldn't let him and he got
frustrated. He said he was annoyed because *he* knew *he* could fix the
problem we were having with a simple JavaScript. I told him that's true but
if it's not going to work on everyone's browser, then what's the point in
having it?

He then tried to show me that almost every site uses JavaScript these days
and therefore, everyone has JavaScript enabled. He started browsing around
with JavaScript disabled to "prove" his point. I told him that every site
he'd been to (including Hotmail) proved MY point even more - that it's bad
design to rely on JavaScript for site functionality/stability. It was very
aggrovating because he still didn't quite understand.

He's a very argumentative fellow. Shame.
 
J

Jukka K. Korpela

brucie said:
he probably uses a WYSINWYG.

What's that? I'm familiar with
WYSIWYG = What You See Is What You Get
and
WYSINWOG = What You See Is Not What Others Get,
and they denote the same thing, but whats WYSINWYG?
 
K

kayodeok

Jukka K. Korpela said:
What's that? I'm familiar with
WYSIWYG = What You See Is What You Get
and
WYSINWOG = What You See Is Not What Others Get,
and they denote the same thing, but whats WYSINWYG?

Google says Brucie has been using this Acronym
for at least 2 years:
http://groups.google.com/groups?as_q=WYSINWYG&as_uauthors=brucie&num=100

http://www.acronymfinder.com/af-query.asp?p=dict&String=exact&Acronym=WYSINWYG
http://www.google.com/search?q=WYSINWYG
http://groups.google.com/groups?q=WYSINWYG
 
W

William Tasso

Jukka said:
What's that? I'm familiar with
WYSIWYG = What You See Is What You Get
and
WYSINWOG = What You See Is Not What Others Get,
and they denote the same thing, but whats WYSINWYG?

Whilst not presuming to speak for brucie, I have been using the term for
some time - since the first attempts at a WYSIWYG word processor.

It's use is similar to your WYSINWOG (which is fairly new to me)

WYSINWIG - What you see is not[1] what you get.

[1] or 'nearly' in some circumstances.
 
B

brucie

What's that? I'm familiar with
WYSIWYG = What You See Is What You Get
and
WYSINWOG = What You See Is Not What Others Get,
and they denote the same thing, but whats WYSINWYG?

i don't know :-(

i just type what the little voices tell me to. they get mad if i don't.
they make me do things.
 
W

William Tasso

Toby said:
William said:
WYSINWIG - What you see is not[1] what you get.

Odd way of abbreviating the second "you".

Odd indeed. I can offer no justifiable reason for this behaviour - my only
(feeble) excuse is that neither variation has an entry in my spell-checker.
I have now completed the investigation, the offending finger has been tried
and convicted. In the absence of a pardon being granted, the offending
finger will be taken to a place of execution at dawn where there will be a
small ceremony followed by an informal wake with tea and biscuits as well as
the obligatory finger buffet.

ps: I should like to take this opportunity to thank e n | c k m a and the
rest of the team for their valiant, but ulimately, unsuccessful defence.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top