1,<fieldset>元素可将表单内的相关元素分组,<legend>标签为<fieldset>标签定义标题,示例代码如下:
1 <form> 2 <fieldset> 3 <legend>health information</legend> 4 height: <input type="text" /> 5 weight: <input type="text" /> 6 </fieldset> 7 </form>
2,<Header>用来定义文档的页眉。<nav>标签定义导航链接的部分,如在_Logout.cshtml中添加如下导航信息:
1 <header> 2 <nav> 3 @Html.ActionLink("首页","Index","Home") | @Html.ActionLink("购物车","Index","Cart") 4 @if(User.Identity.IsAuthenticated) 5 { 6 @:|@Html.ActionLink("注销","Logout","Member") 7 } 8 else 9 { 10 @:|@Html.ActionLink("登录","Login","Member") 11 @:|@Html.ActionLink("注册","Register","Member") 12 } 13 </nav> 14 </header>