Fed up with VS.NET HTML/CSS Formatting!!

Posted on 2005-04-07
Last Modified: 2010-04-07

As the title suggests, i've just about had it with VS.NET formatting my HTML and CSS for me..... it's just awful.

As an example, if i type in... (and let's face it doesn't exactly *like* you typing anything in the HTML view) :

<div style="padding:0"></div>

Why, when i exit out and then back in again does it now look like:


So not only does it add unwanted attributes it also CAPITALIZES them.... i'm sure web standards say that CSS should be lowercase.
On top of that, it orders them in a completely random way... one minute i'm typing out a label at the top of the page next minute it's hidden in the mish-mash HTML it creates.

I've tried just about every option i know about in VS.NET.

Anybody else ready to slap MS silly?

I've probably blatently missed something so any pointers how i can stop 'helping out' that would be great.

Question by:Type25
    LVL 9

    Author Comment

    Also, please don't reply with:

    1) Use notepad
    2) Use external stylesheet (i'm already doing this in a lot of cases)
    3) Ignore it

    Thanks!!!  ;)

    LVL 2

    Expert Comment

    Read this blog.. It will answer your question.
    LVL 9

    Author Comment

    Right OK...   how do i change what HTML paraser VS.NET uses?

    LVL 2

    Accepted Solution

    You will need to install a 3rd party HTML parser.  The blog mentions HTML Tidy.. but you will need to configure it to your likings, which can become a lenghty process.

    The point here is, if you use Visual Studio .NET to write your HTML files, you will not be able to turn off the auto-correction.  You can however install a 3rd party software, such as (  and configure it so it will format to your likings.

    Microsoft has also published a howto on this subject.

    I hope this helps.
    LVL 9

    Author Comment

    Thanks, that's what i was after.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    I have developed many web applications with asp & and to add and use a dropdownlist was always a very simple task, but with the new, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
    One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on could not pull conte…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now