Pergunta

I have the productivity power tools installed in my Visual Studion 2010 installation. My college frontend developer is working on a mac. When I implement his html in VS, the "fix mixed tabs" component "asks" me "You have mixed tabs and spaces" with two option "tabify" or "untabify".

Which option gives us the cleanest HTML when the website is called from the browser? Is there any difference in client side rendering/downloading time?

Foi útil?

Solução

I suggest using tabify if you are editing html. c# .net code-wise use untabify as it adhere to the C# coding convention which use spaces as tab

Outras dicas

There is an option to turn off this warning in Productivity Power Tools 2013. Tools -> Options -> Productivity Power Tools -> Fix Mixed Tabs (not one of the subitems in the left-menu, the 8th item in the list on the right) -> off

Generally speaking this warning means that in some places tab is used for indent and spaces in another.

For example

"\t<p>Text goes here\n    </p>"

Here the first line is indented with tab and the second with four spaces. What to choose depends solely on your preferences. Personally I prefer spaces (Untabify in this case). However, one tab takes one byte, and indenting with spaces takes four. If the size of your html is about 1000 lines, using tabs will reduce your final HTML to 3000+ bytes.

Tabs and spaces are recognized by all systems and usually occupies the width of four spaces, so it should look the same in all normal editors. There is no any difference in rendering, but the load time may vary for the above stated reason.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top