January 10, 200818 yr Divs are for layout, Tables are for tabular data. So you can't really compare one with the other, yes some people do use tables for layouts but really they shouldn't as its not good idea for many reasons
January 10, 200818 yr Author table less is robot friendly for SEO Oh, cool, But one thing that I don't understand on divs is how you align them to differnet pars and things like that
January 10, 200818 yr It's not DIVs or tables, it's semantic HTML or tables. (sorry really picky I know). Either way it should be the right HTML element for the right purpose. i.e.: if you want to represent a paragraph of information, you use the <p> element. If you want to represent tabular data then use tables. If you want to wrap a load of HTML together and style it or move it around your use a <div>.
January 10, 200818 yr As a bad-HTML writer, I do everything with tables, I go; a ) Make website in Photoshop b ) Slice website in Photoshop c ) Save website 'for web', producing an index.html d ) Tidy it up I think actually, in honour of this topic, I'm going to go learn how to code a div website
January 10, 200818 yr As a bad-HTML writer, I do everything with tables, I go; a ) Make website in Photoshop b ) Slice website in Photoshop c ) Save website 'for web', producing an index.html d ) Tidy it up I think actually, in honour of this topic, I'm going to go learn how to code a div website Beware not to catch divius. SPANs and DIVs got no semantic meaning, so use them as a last resort and use the other elements availible in the Strict doctype. Also, class="red" is just as bad semantics as <b> so keep your classes related to the content, not by what you intend their visual appearance will be. Sorry if you allready know this, but it's something often seen when people move from table layout to pure CSS layout. I did.
February 25, 200818 yr if you want to represent a paragraph of information, you use the <p> element. Which is better practice? : To use <p> and </p> to wrap paragraphs of text OR : to use <br><br> tags between the "paragraphs" to produce the same effect?
February 25, 200818 yr <p> tags are for containing paragraphs of text. If it's a paragragh then using a <p> tag is applicable. <br /> is only used when you actually need a line break in a document.
February 25, 200818 yr Divs. They're much more semantic. They use much less markup. They help my markup be POSH. And they're just generally more uber than tables.
February 25, 200818 yr First off read this. If that does not convince you that tables are bad and semantic HTML is good (as opposed to DIVS), then go away and read this, then this.
February 25, 200818 yr Which is better practice? : To use <p> and </p> to wrap paragraphs of text OR : to use <br><br> tags between the "paragraphs" to produce the same effect? Use a <p> add the content and close it with a</p>. When a paragraph ends and another one starts you use another <p>. Rinse and repeat. Never use <br /> for doing what the code is already in place for.
February 27, 200818 yr Like many have said above, tables should only be used for tabular or gridded data. Everything else should be coded in semantic HTML with CSS styling. Never use tables for anything else (like an entire page), you're just asking for trouble! Rob
February 27, 200818 yr Divs are for layout, Tables are for tabular data... Well put, any web designer of rank uses XHTML Strict, DIV's and CSS to manage styles and layout
February 27, 200818 yr Well put, any web designer of rank uses XHTML Strict, DIV's and CSS to manage styles and layout I dispute the use of XHTML strict as it's features aren't supported by the majority of browsers (ie. You won't see the benefits of the XML functionality), but definitely a strict doctype for sure!
February 27, 200818 yr I dispute the use of XHTML strict as it's features aren't supported by the majority of browsers (ie. You won't see the benefits of the XML functionality), but definitely a strict doctype for sure! With the exception that you can use a simple XML parser to traverse the document. Good for when you have small lightweight applications that access the net to obtain infromation. Such the ever so popular desktop gadgets.
February 27, 200818 yr With the exception that you can use a simple XML parser to traverse the document. Good for when you have small lightweight applications that access the net to obtain infromation. Such the ever so popular desktop gadgets. Yes, definitely - but for the average web developer and the majority of websites, this wouldn't be needed/useful.
February 29, 200818 yr Hi, Divs are for layout, Tables are for tabular data means some times you have to display tabular data from database .that time you use tables . divs always use for design layout. Regards, www.cssdog.com
February 29, 200818 yr Too me, it'll take something amazing to make me switch to something else (but shhhhhh, don't tell anyone that! )
February 29, 200818 yr Eh, I tend to use XHTML. I like the rules of it. Every tag has to be closed. I like my extra forward slashes!
Create an account or sign in to comment