Saturday, 9 July 2011

usage of DIv and SPAN in HTML:)

Do you want your website to be more attractive and organize?If you want to,then use div and span.
First and foremost ,what is div?The div tag defines a division or a section in an HTML document.The div tag is often used to group block-elements to format them with styles.The div tag gives you the ability to name certain sections of your documents so that you can affect them with style sheets or Dynamic HTML.It also gives you the chance to define the style of whole sections of HTML. You could define a section of your page as a call out and give that section a different style from the surrounding text.
What is span?Do you know what is it?For me div and span are similar.But what are their differences?One of its differences is that div is a block element while span is an inline element. Now ,what is span?The span tag is used to group inline-elements in a document.The span tag provides no visual change by itself.
The span tag provides a way to add a hook to a part of a text or a part of a document.When the text is hooked in a span element you can add styles to the content, or manipulate the content with for example JavaScript.Now that you know what are their functions.Can you decide what to use?

No comments:

Post a Comment