I\'ve read somewhere that element behaves like both. If correct, could someone please explain with examples?
It's true, they are both - or more precisely, they are "inline block" elements. This means that they flow inline like text, but also have a width and height like block elements.