To

One of the little things about a HTML editor is the way that block formatting works. Most users probably don't realize when they run into these kinds of problems, but they do.

The reason why editors have a hard time is because they are trying to emulate a word processor with some things. There are simularities between HTML and word processing documents - both have paragraphs, headings, bold, etc. But there are important differences as well. Forcing things too much into a mold with word processors can hurt you.

One thing that we got feedback about, and that I did not like myself, was that VS.NET 2003 always seemed to add <P> tags everywhere. Even if you have a document with just a body in it, if you press enter while in design view, you get a <P> tag. Delete everything, get a <P> tag if you didn't have one.

What I didn't like, and what a lot of other users didn't like, is that they got a <P> tag when they didn't ask for one. It makes sense to split a <P> tag if you actually have one and are inside of it. But if I have no <P> tag, adding one just so there is something to split seems to be thinking a bit too much.

So the way whidbey works is this: If you press enter inside any block format tag (other than DIV) then the block will split around where you pressed enter. If you press enter at the end of some of these tags (like the heading tags) then a new <P> will start.

If you press enter inside of a DIV, or a table cell, or the body, then we insert a <BR>. If you hold down shift+enter, you always get a <BR> no matter where you are.

If you really want a <P> tag, the format dropdown on the formatting toolbar will create one if you are inside of a non-block tag and you select <P> from the list.

I think that this design works better for most people. If you already have paragraph stuff we respect it and handle it. If you never use paragraph formatting we never put it there for you unless you explicitly ask for it.