But won't that confuse the search spiders?
No, quite the opposite.
If every piece of content is marked up as a heading, paragraph, list, table, or form, the search engines will have a much easier job to do in parsing and understanding it - and it will also ensure that your CSS works as expected without some random "style bleed" due to unclosed tags or nesting issues making a style "leak" beyond where it was supposed to apply.
___It also makes customising sites within the browser possible. (Ideally each element should have a unique ID, but I guess that's not gonna happen. But so long as the main container divs have IDs, then all is well.)
___This approach also makes styling - and redesigning - your site much easier.
I would like to mention that the nl2br function in php has certainly had an impact in the proliferation of break tags on certain portions of my website.
These aren't design choices and when I code things by hand, I use pargraph tags. Just some food for thought since this may not always be a religious preference :)
As we are getting down to the nitty-gritty on this,
</p> is actually meaningless as it is an optional closing tag in HTML. So in fact you should always consider the immediately adjacent block element to the text following a
<p> to be the marker for the end of a paragraph.
<p>Now is the time for all good men and women to come to the aid of their [b]countries.
<h3>[/b]This h3 element closes the paragraph</h3>
So, it is neither
<br><br>, it is nothing at all. :)
The </p> is optional in HTML 4.01 Transitional, but move up to Strict, or to XHTML, and it is always Required.
Karmov wrote on Feb 14": I would like to mention that the nl2br function in php has certainly had an impact in the proliferation of break tags on certain portions of my website."
I noticed this issue on a site I'm developing.
I thought I'd try to dream up a quick fix; I haven't fully tested this yet, but it seems to work for me at least... instead of using the nl2br solution, I'm simply using this code to mark-up all my breaks prior to output:
$s = preg_replace("/\\r\\n\\r\\n/", "</p><p>", $s);
This is for double breaks (for example, where someone hits return/enter twice in an input box in order to create a new parapraph).
It can easily be modified to replace single returns too, but trouble with that is where people have hit return twice it would create empty paras <p></p> in your html.
| This 38 message thread spans 2 pages: < < 38 ( 1  ) |