Reputation: 11
If you look at my code (here), I gave input
element to form1
and span
element in form2.span
. form2.span
is inline and input
is also an inline element, but why are they displaying in different ways? If not, what about the input
element?
What is the difference between span
, input
, and div
elements?
Upvotes: 0
Views: 1974
Reputation: 5631
A few things:
<html>
tags for that matter), it's not doing much here, but could do some random things if is not because it puts some browsers into 'quirks' mode.<span>
tag.As for the difference between divs and spans/inline elements. Look up "Inline vs Block Elements" in Google, or even here on StackOverflow, I'm sure it's been covered a few times.
Upvotes: 6