On 24 Mar, 07:02, "howa" <howac...@gmail.comwrote:
seems interesting?
Q. Which naming convention for HTML stuffs you perferred?
BE CONSISTENT!
BE CONSISTENT IN ANYWHERE THE USERS CAN SEE!!
HTML doesn't have much naming itself. HTTP and the HTML DOM are the
common requirements to start adding names to things.
HTTP is case-sensitive (unless made to be not so) It's also used by
people who don't understand this. So don't rely on it, don't make it
confusing and assume that all HTTP names will be entered in their
simplest and crudest forms. If you _start_ them out in this form, then
there's less space for error later.
Also punctuation characters are only going to confusing things for
data entry. My parents have sticky labels on their <Returnand <Tab>
keys, so how would you expect them to find a hyphen?
They _might_ make a domain name easier to read though. It can also
avoid the "powergenitalia" problem, where mis-reading is potentially
embarassing.
1. user-list.html VS userlist.html VS user_list.html
userlist.html
Also it's a good idea to avoid page names at all. Give your site a
sensible directory structure, use default pages throughout and don't
require users to ever remember or enter a URL that involves
remembering more than a domain name and simple directory name.
e.g. example.com/doggiechunks
rather than
example.com/competitions/default.asp?contest=doggiechunks_promo
(That 2nd is almost a real example, as printed on competition entry
forms by a major UK market-research aganecy)
Once they're inside the site and navigating by clicking links rather
than typing, then you have much more freedon.
<div id="main_content"... or <div id="mainContent".. or <div id="main-
content"..
DOM element names are used by programmers, for programmers. They're
not accessible to the punters beyond the 4th wall. So I'd suggest
camel case (look it up)
<div id="mainContent"..