HTML

Topic: HTML Basic

What are differences between DIV and SPAN?

DIV is used to select a block of text so that one can apply styles to it.SPAN is used to select inline text and let users to apply styles to it.The main difference between DIV and SPAN is SPAN does not do formatting by itself. Also the DIV tag is used as a paragraph break as it creates a logical division of the document in which it is applied. This is in contrast to the SPAN as SPAN simply dos the functionality of applying the style and alignment whatever was specified in it. DIV has ALIGN attribute in it which is not present in case of SPAN. Thus DIV is used in cases where one wants to apply styles to a block of text. But there may be situations in which there might not be clear well structured block of text to work with. In those cases one can opt to apply SPAN which is used to apply styles inline. That is in other words DIV is generally used for block of text and SPAN is generally used for words or sentences.

Browse random answers:

What is HTML?
What is a tag?
What is a HTML Elements ?
What is the simplest HTML page?
Differentiate HTML and HTML Extension? 
How comfortable are you with writing HTML entirely by hand? 
How an index document is defined? 
How a body is defined in HTML? 
How can I include comments in HTML? 
Are there any problems with using frames?
What is an Attributes?
Do search engines dislike frames?
What are HTML Headings?
What is a DOCTYPE? Which one do I use? 
what is a HTML Lines?
What is HTML Paragraphs?
Define URL.?
How can I check for errors?
What are the various text formatting tag in HTML? 
How do I set the focus to the first form field?
How can I show HTML examples without them being interpreted as part of my document?
What is image mapping in HTML? 
 How can I copy something from a webpage to my webpage?
 Is it possible to make the HTML source not viewable? 
Why doesn't my title show up when I click "check it out"? 
How do I rename all the files from .htm to .html after copying them from a PC to a UNIX machine? 
How do I specify page breaks in HTML?
How do I put sounds for older versions of Internet Explorer?
My page looks good on one browser, but not on another. 
How can we use MARQUEE in HTML?
 Can I have two or more Submit buttons in the same form?
 Is there a site that shows which tags work on which browsers? 
How do we make a picture as a background on my web pages?
Why do my links open new windows rather than update an existing frame?
What is a DOCTYPE?
What are meta tags and why it is used?
How to keep sound for older version internet explorer? 
How can I show HTML examples without them being interpreted as part of my document? 
How do I do multiple colors of text? 
How do I change the title of a framed document? 
What is everyone using to write HTML? 
Does HTML is case sensitive? 
What are the advantages of HTML? 
What are the disadvantages of HTML? 
What is the preferred way for adding a background color in HTML?
How do I add scrolling text to my page?
How can we resize the image?
How we define Src Attribute and Alt Attribute in HTML?
How do I eliminate the blue border around linked images? 
Why to specify the alt value in the img tag?
How FontSize and Font Size is differ in HTML?
What is the marquee property for text to move from bottom to upside
What is an iframe in HTML?
What is a Syntax iframe?
What is a <frameset> tag?
How can an abbreviation be specified in HTML?
How can you specify an acronym in HTML?
How to mark deleted text and inserted text?
How to redirect an user with a URL in HTML?
How to display a dropdown list with a selected value?
Why does the browser show my plain HTML source? 
What is web a application?
Name three ways to define a color in html?
How do I change the title of a framed document?
How do I specify a specific combination of frames instead of the default document?
How do I make a frame with a vertical scrollbar but without a horizontal scrollbar?
If you see a web address on a magazine, to which web page does it point?
Why are there both numerical and named character entity values?
When is it appropriate to use frames?
What happens if the number of values in the rows or cols attribute doesn’t add up to 100 percent?
How are active links different from normal links?
Is there a way to get indexed better by the search engines?
Should I use lower case or upper case for tags?
How do I get out of a frameset? 
Are there any problems with using frames? 
What are differences between DIV and SPAN?
How do I close a browser window with HTML code?
Is it possible to make the HTML source not viewable?
Do I have to memorize a bunch of tags?
 heading 1 (h1)margin-left: 0px margin-right: 0px; margin-top: 8px; margin-bottom: 8px;heading 2 (h2)margin-left: 0px margin-right: 0px; margin-top: 10px; margin-bottom: 10px;heading 3 (h3)margin-left: 0px margin-right: 0px; margin-top: 12px; margin-bottom: 12px;heading 4 (h4)margin-left: 0px margin-right: 0px; margin-top: 16px; margin-bottom: 16px;heading 5 (h5)margin-left: 0px margin-right: 0px; margin-top: 20px; margin-bottom: 20px;heading 6 (h6)margin-left: 0px margin-right: 0px; margin-top: 28px; margin-bottom: 28px;