views:

24

answers:

3

Hello all,

I don't want to use XHTML but VS2008 forces me to.

When I type in an ASPX document < br it will autocomplete to < br />

But normal HTML4.01 does not use these things.

So how do I get rid of this annoying XHTML autocomplete? I want normal HTML 4.0

A: 
Tools -> Options -> Text Editor -> HTML -> Validation -> Target:

P.S.

Your "normal" HTML 4.0 is 10 years out-of-date. So absolutely nothing "normal"

abatishchev
Doesn't work.And please read up on XHTML vs HTML...
Rogier21
@Rogier21: HTML has no benefits over XHTML except lack of strictness to coding style
abatishchev
A: 

And why do you want non-XHTML compiant HTML? Anything XHTML is by definition also HTML and is understood by all browsers you'll reasonably encounter. Instead, be happy that the aspx code can be read and understood by more tools.

Pontus Gagge
A: 

Visual Studio's HTML markup editor is basically an XML editor with HTML tag validation added. You're not going to get rid of XML that easily. You could try the following, but no guarantees:

  • Tools -> Options -> Text Editor -> HTML -> Format -> Auto insert close tag = false
  • Tools -> Options -> Text Editor -> HTML -> Miscellaneous -> Format HTML on paste = false
  • Tools -> Options -> Text Editor -> HTML -> Validation -> Target = HTML 4.01

But more fundamentally, why bother? <br /> is not technically valid HTML 4.01, but all browsers recognise it and do the right thing. <br/> is more problematic.

See the W3C XHTML compatibility guidelines for more info.

Christian Hayter