<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Wojno: Rendering Forms in a Paragraph</title>
    <link>http://christopher.wojno.com/articles/2008/07/14/rendering-forms-in-a-paragraph</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Exploration through Code</description>
    <item>
      <title>Rendering Forms in a Paragraph</title>
      <description>&lt;p&gt;Here&amp;#8217;s an example:&lt;/p&gt;


&lt;pre class="code"&gt;
&amp;lt;p&amp;gt;If you're looking for other confidential
search parameters, click
&amp;lt;form action="secret_search" method="post"&amp;gt;
&amp;lt;input type="hidden" value="my secret search parameters"/&amp;gt;
&amp;lt;input type="submit" value="here"/&amp;gt;
&amp;lt;/form&amp;gt;
!&amp;lt;/p&amp;gt;
&lt;/pre&gt;

	&lt;p&gt;You can&amp;#8217;t.&lt;/p&gt;


&lt;Q&gt;The P element represents a paragraph. It cannot contain block-level elements (including P itself).&lt;/Q&gt;
&lt;cite&gt;&lt;a href="http://www.w3.org/TR/REC-html40/struct/text.html#h-9.3.1"&gt;&lt;span class="caps"&gt;HTML4&lt;/span&gt;.0 Reference&lt;/a&gt;&lt;/cite&gt;

	&lt;p&gt;That means you&amp;#8217;re stuck with a line-break if you want to have buttons with form data in your paragraphs.&lt;/p&gt;</description>
      <pubDate>Mon, 14 Jul 2008 12:16:00 -0700</pubDate>
      <guid isPermaLink="false">urn:uuid:09e1209d-6515-4123-a72e-69e6e5a1f634</guid>
      <author>Christopher Wojno</author>
      <link>http://christopher.wojno.com/articles/2008/07/14/rendering-forms-in-a-paragraph</link>
      <category>How-Tos</category>
      <category>line</category>
      <category>html</category>
      <category>form</category>
      <category>paragraph</category>
      <category>break</category>
    </item>
    <item>
      <title>"Rendering Forms in a Paragraph" by quadir</title>
      <description>&lt;p&gt;I&amp;#8217;m not seeing the correlation between your example and your conclusion.&lt;/p&gt;


If you want your example to render on a single line, but have discovered that you can&amp;#8217;t put a &amp;lt;form&amp;gt; inside a &amp;lt;p&amp;gt;, the proper solution is to move the &amp;lt;form&amp;gt; outside the &amp;lt;p&amp;gt;:
&lt;pre&gt;&lt;code&gt;
&amp;lt;form action="secret_search" method="post"&amp;gt;
&amp;lt;p&amp;gt;If you're looking for other confidential
search parameters, click
&amp;lt;input type="hidden" value="my secret search parameters"/&amp;gt;
&amp;lt;input type="submit" value="here"/&amp;gt;
!&amp;lt;/p&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

If however you wanted them to appear on seperate lines, then either you need to use deprecated linebreaks as you said,  or a better solution would be to make each line it&amp;#8217;s own paragraph.  You could also use div blocks.
&lt;pre&gt;&lt;code&gt;
&amp;lt;p&amp;gt;If you're looking for other confidential
search parameters, click&amp;lt;/p&amp;gt;
&amp;lt;form action="secret_search" method="post"&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;input type="hidden" value="my secret search parameters"/&amp;gt;
&amp;lt;input type="submit" value="here"/&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;/form&amp;gt;
&amp;lt;p&amp;gt;!&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Finally you reference the HTML 4.0 specification (not HTML 4.01) and yet your example is clearly XHTML of some sort.  In either case, I think the &lt;strong&gt;best solution&lt;/strong&gt; would be to implement this &lt;b&gt;formatting using CSS&lt;/b&gt;, where you can redefine the rules for p tags and don&amp;#8217;t need to the specification at all but still retain some logical flow.&lt;/p&gt;</description>
      <pubDate>Tue, 15 Jul 2008 07:01:42 -0700</pubDate>
      <guid isPermaLink="false">urn:uuid:10646cd2-a9df-4358-82c3-c26532419b72</guid>
      <link>http://christopher.wojno.com/articles/2008/07/14/rendering-forms-in-a-paragraph#comment-53</link>
    </item>
    <item>
      <title>"Rendering Forms in a Paragraph" by Hodinky</title>
      <description>&lt;p&gt;And what about CSS? Isn&amp;#8217;t it any CSS hack for this situation?&lt;/p&gt;</description>
      <pubDate>Tue, 15 Jul 2008 04:02:49 -0700</pubDate>
      <guid isPermaLink="false">urn:uuid:59f39221-2353-476b-a49b-2d6ae01132e2</guid>
      <link>http://christopher.wojno.com/articles/2008/07/14/rendering-forms-in-a-paragraph#comment-52</link>
    </item>
  </channel>
</rss>
