Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Very dismissive. Anyone not using <span> should take a second look. Of all the elements, this is the one to change font, size, color, etc. in any dynamic text without offsetting anything in your layout. Do you really want to throw your user's text inside a <div> inside your nice <div> layout? No.


Indeed, <span> is for inline elements what <div> is for block elements: a way to organize and apply styling. With raw html/js it can also be used for targeting text changes.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: