DIV TAG:
Following are the characteristics:
As the name indicates, the div tag defines a ‘division’ in a web page.
div is a block-element; its default display value is “block”.
div tag is commonly used while creating Css based layouts in html.
by default, a line-break is placed before and after this element.
SPAN TAG:
Following are the characteristics:
span tag makes no visual difference in the page, unless customised with style attribute.
span is an in-line element.
span is commonly used to stylize texts. The in-line feature makes it easy to use custom styles without changing the layout.
No line-breaks by default, but this can be achieved if we change its in-line nature by specifying in the style attribute to ‘display:block;’
No comments:
Post a Comment