File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes HTML naming Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "HTML naming" Watch "HTML naming" New topic
Author

HTML naming

Jagdeep Sharma
Ranch Hand

Joined: May 24, 2010
Posts: 121

Guys,

I am facing trouble in naming(id,class attribute) my div,span,p tag. I know that they should be structural not presentation. What name should be given to it. Is there any book available for practicing these names.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12612
They should be named what they are, like "address" or "user" or "blogTitle" or whatever. I'm not sure what there is to practice, really.
Bear Bibeault
Author and opinionated walrus
Marshal

Joined: Jan 10, 2002
Posts: 48842

My guidelines are to be clear and to be expressive. Avoid silly abbreviations (unlike on Wheel of Fortune, vowels are not expensive, don't leave them out!) Be careful to avoid reserved words ("submit" being a common landmine). Be semantic.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Jagdeep Sharma
Ranch Hand

Joined: May 24, 2010
Posts: 121

Bear Bibeault wrote:My guidelines are to be clear and to be expressive. Avoid silly abbreviations (unlike on Wheel of Fortune, vowels are not expensive, don't leave them out!) Be careful to avoid reserved words ("submit" being a common landmine). Be semantic.



Hey Bear,

Can you refer some book for this type of practicing. I will be thankful to you.
Bear Bibeault
Author and opinionated walrus
Marshal

Joined: Jan 10, 2002
Posts: 48842

There is no book that addressees how to intelligently name things. Use common sense and be semantic.
 
 
subject: HTML naming
 
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture