http://apidock.com/rails/ActionView/Helpers/TagHelper/content_tag
<%= content_tag :div, class: "strong", id: "tab-1", style: "display: block" do -%> Hello world! <% end -%>
=>
<div class="strong" id="tab-1" style="display: block">Hello world!</div>
如果没有别的标签
<%= content_tag :div, "Hello world!", class: "strong", id: "tab-1", style: "display: block" -%>
#1 楼 @miclle 谢谢 也尝试这个 不过落下个 do