你生成格式良好的HTML吗? [英] Do you generate nicely formatted HTML?

查看:189
本文介绍了你生成格式良好的HTML吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当使用输出HTML的某些服务器端技术时,您是否尝试很好地格式化输出?例如,添加换行符和缩进?



这两种风格的优缺点是什么?

解决方案

我倾向于不打扰自己。考虑到像Firefox的DOM Inspector和Firebug这样的工具,它将HTML转换成一个漂亮的可折叠的树,我认为没有必要将原始的HTML格式化。它还节省了每个请求中的几个字节。


When using some server-side technology which is outputting HTML, do you try to format the output nicely? For example, adding line breaks and indentation?

What are the pros and cons of either style?

解决方案

I tend not to bother myself. Given tools like Firefox's DOM Inspector and Firebug, which converts your HTML into a nice, collapsible tree, I see no point to making the raw HTML nicely formatted. It also saves on a few bytes in each request.

这篇关于你生成格式良好的HTML吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆