title: Text is not allowed between the opening and closing tags for 'ul'
body: <p>I was wondering if I could have someone on here look over the following segment of code 
  that I have and provide me suggestions about how to restructure it properly.</p>
  
  <p>Currently, I'm getting the following warning error for it:
  "Validation (HTML5): Text is not allowed between the opening and closing tags for element 'ul'."</p>
  
  <p>Any ideas about how I can remove that warning? When I insert an
  "li" tag in there, it tells me that I can't overlap "li" tags. So I know that solution won't work. </p>
  
  <p>Any help would be greatly appreciated. Thank You</p>
  
  <pre><code>&lt;ul class="menuList"&gt;
       @if (Model.PurchaseForm.WorkFlowStep != "e")
       { 
           &lt;li&gt;@Html.ActionLink("Edit", "PurchaseApprovalForm_Edit", "Forms", new { id = @Model.PurchaseForm.PurchaseApprovalForm_PK }, new { @class = "menuButton" })&lt;/li&gt;
           &lt;li&gt;@Html.ActionLink("Delegate", "DelegateForm", "Forms", new { id = @Model.PurchaseForm.PurchaseApprovalForm_PK, formType = "Purchase" }, new { @class = "menuButton" })&lt;/li&gt;             
           if (User.IsInRole("Pur_Requestor"))
           {
             &lt;li&gt;&lt;span id="undo" class="menuButton" style="cursor:pointer"&gt;Cancel Form&lt;/span&gt;&lt;/li&gt; 
               {
                   Html.Telerik().Window()
                            .Name("Window")
                            .HtmlAttributes(new { @style = "display:none;" })
                            .Title("Confirm")
                            .Draggable(false)
                            .Resizable(resizing =&gt; resizing
                                .Enabled(false)
                                .MinHeight(250)
                                .MinWidth(200)
                                .MaxHeight(500)
                                .MaxWidth(500)
                            )
                            .Modal(true)
                            .Buttons(b =&gt; b.Maximize().Close())
                            .Content(@&lt;text&gt;
                                 @using (Html.BeginForm("PurchaseApprovalForm_Cancel", "forms", FormMethod.Post, new { id = "confirmform" }))
                                 {
                                     &lt;li&gt;
                                     &lt;input type=hidden id="formid" name="formid" value="@Model.PurchaseForm.PurchaseApprovalForm_PK"  /&gt;
                                     &lt;label&gt;Reason :&lt;/label&gt; @Html.TextArea("reason", new { cols = 70, rows = 2 })
                                     &lt;input type="submit" value="Submit" /&gt;  
                                     &lt;/li&gt;
                                 }
                                 &lt;/text&gt;)
                                 .Width(600)
                                 .Height(300)
                                 .Render();
               }
               {
                  Html.Telerik().ScriptRegistrar()
                     .OnDocumentReady(@&lt;text&gt;
                          var windowElement = $('#Window');
                          var undoButton = $('#undo');
                          undoButton
                              .bind('click', function(e) {
                                  windowElement.data('tWindow').open();
                                  undoButton.hide();
                              })
                              .toggle(!windowElement.is(':visible'));
                          windowElement.bind('close', function() {
                              undoButton.show();
                          });
                      &lt;/text&gt;);
               }
           }
       }
        &lt;/ul&gt; 
  </code></pre>