Reply to Re: Naming files, classes, ids...

Your name:

Reply:


Posted by dorayme on 11/11/05 06:22

> From: Davémon <nospam@nowhere.no>
>
> dorayme wrote:
>>
>> Anyway, I know it has been said to keep to lower case for most
>> of these things to avoid trouble. But if one is consistent, what
>> trouble has anyone ever experienced?
>
> I've never had any trouble, using all lowercase and underscores '_' in
> place of spaces to separate words to aid the eye, which is a bit more
> what the eye is used to reading than CamelCaps.
>
> I like to try to name classes and id's in css as meaningfully as
> possible, rather than describing the styling. i.e. i'd use .story_text
> in preference to .middle_content, so that when I decide that the middle
> really should be on the left, the name still remains correct. When there
> are things that are just done for presentational reasons rather than
> semantic ones,I give them obviously layout-orientated names like #column_one
>
> Having said that, recently I've taken up using hyphenated filenames as
> it's suggested Google et al. recognise each individual word that way.
> But it seems counter-intuitive to me as the normal use of a hyphen is to
> literally combine things together, not separate them...
>
> http://www.prweaver.com/blog/2004/08/26/2-hyphen-and-underscore
>

Sounds sensible enough to me. One gets used to things. I prefer
lower case to start any file name or class or id, then capitals
to bring new 'descriptions' into the name as in
"seasideDogs.jpg". I'm sort of vaguely remembering trouble
with hyphens on some servers? I mainly avoid anything but a to z
and no spaces.

--
dorayme

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация