None is better in itself !
It all depends on what you want to do and what the context is.
Want a tip : always choose the path of least resistance, e.g the simplest solution (often the most elegant one) !
That would generally mean :
- use html over js if possible, and if you use js, never loose sight of accessibility (make sure it degrades well for those who have js disabled or unavailable).
- most of the time, use css over inline styles (html) for styling, keep content and presentation separate. But as I said, if you have just one element to style, then don’t create a class for it and bloat your css.
- if php is not heavier than js, maybe choose php, since you don’t depend on browser settings
.: COO - Commerce Guys - Community Driven Innovation :.
MODx est l'outil id