<%= content_tag :p, "Test 1", :class => 'test', :id => "test1" %> <%= content_tag :p, "Test 2" %> <% content_tag(:p, :class => 'test', :id => 'test3') do %> Test 3 <% end %> <% content_tag(:p) do %> Test 4 <% end %> <%= content_tag_with_block %>