DEV Community

Discussion on: Fullstack Trivia: Can You Answer These Interview Questions in 5 Minutes?

Collapse
 
tomstreeter profile image
Tom Streeter • Edited

An alternate (NOT better) answer to #3: They are both generic HTML containers. A <div> defines a two-dimensional container that has both definable horizontal and vertical dimensions. A <span>is one-dimensional in that it only describes length in the direction the user reads text (either horizontally or vertically based on culture).

Collapse
 
liaowow profile image
Annie Liao

I did not know that. Thanks for the input, Tom!