- This topic is empty.
-
AuthorPosts
-
November 18, 2012 at 2:16 pm #40861JohnMotylJrParticipant
Howdy folks,
In programming (java / c#, etc) every class, object, etc i give a name too DEPENDING on what it does i go with ALL CAPS,camelCase, or PascalCase.
1.) Does this ever matter with naming your classes in html?
Also, when i name things, i always try to name them on exactly what it is doing. But im trying to get more into the SEO side of things for web pages.
2.) If there is something that i cannot think of a name for and i give it a generic name, will that hurt me?
When naming these classes (in html/css) i always use under_scores (if its more then one word) because i’m just used to it from different languages.
3.) Would that hurt as well?
If y’all have any good reading or personal insight on this lemme know please.
November 18, 2012 at 2:28 pm #114653TheDocMemberJust to start off: class names have absolutely zero impact on anything to do with SEO.
1) While generally this comes down to personal preference, I’d argue that the majority of the industry would use dashes `some-class-name` over any of the other options.
2) It depends on what the *generic* term is. If you named something `column-a`, I’d say that’s too generic. What is the content inside? Even something like `main-content` while looking generic has a better indication of what it contains.
3) See #1, `hyphens-rule`
November 18, 2012 at 2:32 pm #114654JohnMotylJrParticipantSo the only thing really semantically here are using tags properly? Such as section, aside, etc. ?
November 18, 2012 at 2:37 pm #114655TheDocMemberClass names are still very important for development, but yes, the actually tags themselves are what have a real effect, especially if we’re talking about SEO.
November 18, 2012 at 2:41 pm #114657JohnMotylJrParticipant@TheDoc, thanks for confirming.
@andy_unleash, thanks. The part at the end makes the most sense.
Thanks gents!
November 18, 2012 at 6:09 pm #114669TheDocMemberI think what Josh is saying is that you’d have `
`.November 18, 2012 at 6:15 pm #114670JohnMotylJrParticipantI dont ever style ID’s either. I normally attempt to make a class for the style rather then styling the element (in case i need to add a different element later on). My primary use for ID’s is in use with JS.
November 18, 2012 at 7:38 pm #114681TheDocMemberThat particular element might not repeat, but the things *inside* of it mights.
So it gets a bit tricky if you accidentally do something like
#content .cool-class { }
…later in the CSS file…
.something-else .cool-class {
/* won’t get used since the ID takes over */
} -
AuthorPosts
- The forum ‘Other’ is closed to new topics and replies.