html - 如何更改eclipse html格式

标签 html eclipse formatting

当我在 Eclipse 中打开一个 html 文件,格式化后,它看起来像这样:

<form>
            <fieldset>
                <label for="memberName">Login Name:</label> <input type="text"
                    name="memberName" id="memberName" value=""
                    class="text ui-widget-content ui-corner-all" /> <label
                    for="memberPass">Password:</label> <input type="password"
                    name="memberPass" id="memberPass" value=""
                    class="text ui-widget-content ui-corner-all" />


            </fieldset>
        </form>

但我希望每个标签的所有属性都在同一行

我如何让 eclipse 明白这一点?

最佳答案

要像往常一样更改格式,请转到 Window->Preferences->Web->HTML Files->Editor,然后像这样删除所有内联元素:

enter image description here

关于html - 如何更改eclipse html格式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18418230/

相关文章:

html - 是否可以在 html 的 <option> 中包含 <sub> 脚本?

html - 如何使 HTML 文本区域动态化(即宽度减小时变高)

c - 如何将特定的头文件添加到索引中,就像它包含在 eclipse cdt 中一样?

c# - 格式化 .NET DateTime "Day",不带前导零

.net - 为什么 string.Format 有多种风格?

html - 如何使 <div> 填充 ionic 中的剩余高度

java - 为什么java可以在eclipse中运行并出现编译时错误

java - Eclipse Java - 运行文件问题;我是新来的

formatting - 哪些格式化工具可用于 GLSL?

javascript - HTML 标签的 RegExp.test