Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Guys it may seem stupid to developers, but it makes perfect sense in a SEO context..
-
unknown18358yMaybe the class is a bit confusing in your stylesheet, but you shouldn't use elements in your sheet (only to define some basic stuff for all elements of that type). So it should look like
.h4 {
// stuff here
}
On the front side, it's just an h3 that has the style from an h4. I don't see the problem. -
@unknown then why name the class h4? Why not name it something more appropriate for its use case?
-
unknown18358y@donkeyScript as I said, maybe the class name is a bit confusing. Using "heading-type-4" or "heading-format-4" or something like that would be a little better.
But hey, if it ain't broken... don't fix it :) -
@unknown yea or something else. I personally do not create classes for my header tags. Maybe it's just me but seeing <h4 class="h4"> would drive me up a wall.
-
unknown18358y@donkeyScript I think it would be better to style your heading tags on the element (in the file where your put your elements, you should use classes everywhere else) and create a special class like:
h4 {
// normal h4 styling
font-size: 20px;
}
h4.small {
// small h4
font-size: 16px;
}
This will always work, because your h4.small (with class) is stronger than h4 only. -
It makes sense. Semantically you need an h3 but visually an h4-like element. Separation of concerns.
-
ultrono23508y@donkeyScript because you may want a h3 the size of a h4. Fairly sure Twitter bootstrap has this class in too. My only improvement would be to maybe call it something like .size-h4.
-
maysi2578y@idiazroncero and why don't you use a h4 for the semantic as well? Doesn't make sense at all.
-
@foldager your style rule should be something like .strong-voice and not styled with hierarchy involved. Meaning and visual style are not the same.
-
@maysi Is not the way i'll do It but is still possible. You might have a text where you need to semantically mark sections and subsections with h3 and h4 but visually you prefer them to be the same. Not common, but I've seen it before. Strange, but valid.
And then there is this beauty...
undefined