# Helpers to produce HTML (not XHTML)

**URL:** <https://www.ruby-forum.com/t/helpers-to-produce-html-not-xhtml/107207>\
**Category:** Rails\
**Created:** [June 19, 2007, 6:47am UTC](https://www.ruby-forum.com/t/helpers-to-produce-html-not-xhtml/107207 "2007-06-19T06:47:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dracos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ea666f/32.png) [@dracos](https://www.ruby-forum.com/u/dracos)\
**Post date:** [June 19, 2007, 6:47am UTC](https://www.ruby-forum.com/t/helpers-to-produce-html-not-xhtml/107207/1 "2007-06-19T06:47:30Z")

</div>

Hi,

In a form\_for :comment block, Rails turns

\<%= f.text\_field :name %\>

into

How can I get Rails not to add the closing slash so that it is plain  
HTML and not XHTML?

Thanks,  
Peter

---

<div class="post-metadata">

**Author:** ![dracos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ea666f/32.png) [@dracos](https://www.ruby-forum.com/u/dracos)\
**Post date:** [June 19, 2007, 6:56am UTC](https://www.ruby-forum.com/t/helpers-to-produce-html-not-xhtml/107207/2 "2007-06-19T06:56:30Z")

</div>

On 6/19/07, Peter M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> How can I get Rails not to add the closing slash so that it is plain  
> HTML and not XHTML?
> 
> Thanks,  
> Peter

Isn’t that valid HTML as well? Why would you want to do this?
