Html 如何在登录表上方设置标题

Html 如何在登录表上方设置标题,html,css,asp.net,Html,Css,Asp.net,我正在创建一个带有用户名和密码的登录页面。我想在登录面板表格的左上角放一个文本标题“登录应用程序”。我尝试使用面板标签,但没有成功。您知道在几乎所有登录页面的登录面板或登录表上方都有一个标题吗?我只是想这么做 有没有一种简单易行的方法/标签可以让我做到这一点?我甚至试过占位符,但没能做到这一点 谢谢只需复制以下设计并将其放入aspx即可 <h2> Log In </h2> <p> Please enter your username and p

我正在创建一个带有用户名和密码的登录页面。我想在登录面板表格的左上角放一个文本标题“登录应用程序”。我尝试使用面板标签,但没有成功。您知道在几乎所有登录页面的登录面板或登录表上方都有一个标题吗?我只是想这么做

有没有一种简单易行的方法/标签可以让我做到这一点?我甚至试过占位符,但没能做到这一点


谢谢

只需复制以下设计并将其放入aspx即可

<h2>
    Log In
</h2>
<p>
    Please enter your username and password.
    <asp:HyperLink ID="RegisterHyperLink" runat="server" EnableViewState="false">Register</asp:HyperLink> if you don't have an account.
</p>
<asp:Login ID="LoginUser" runat="server" EnableViewState="false" RenderOuterTable="false">
    <LayoutTemplate>
        <span class="failureNotification">
            <asp:Literal ID="FailureText" runat="server"></asp:Literal>
        </span>
        <asp:ValidationSummary ID="LoginUserValidationSummary" runat="server" CssClass="failureNotification" 
             ValidationGroup="LoginUserValidationGroup"/>
        <div class="accountInfo">
            <fieldset class="login">
                <legend>Account Information</legend>
                <p>
                    <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">Username:</asp:Label>
                    <asp:TextBox ID="UserName" runat="server" CssClass="textEntry"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName" 
                         CssClass="failureNotification" ErrorMessage="User Name is required." ToolTip="User Name is required." 
                         ValidationGroup="LoginUserValidationGroup">*</asp:RequiredFieldValidator>
                </p>
                <p>
                    <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Password:</asp:Label>
                    <asp:TextBox ID="Password" runat="server" CssClass="passwordEntry" TextMode="Password"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password" 
                         CssClass="failureNotification" ErrorMessage="Password is required." ToolTip="Password is required." 
                         ValidationGroup="LoginUserValidationGroup">*</asp:RequiredFieldValidator>
                </p>
                <p>
                    <asp:CheckBox ID="RememberMe" runat="server"/>
                    <asp:Label ID="RememberMeLabel" runat="server" AssociatedControlID="RememberMe" CssClass="inline">Keep me logged in</asp:Label>
                </p>
            </fieldset>
            <p class="submitButton">
                <asp:Button ID="LoginButton" runat="server" CommandName="Login" Text="Log In" ValidationGroup="LoginUserValidationGroup"/>
            </p>
        </div>
    </LayoutTemplate>
</asp:Login>

登录

请输入您的用户名和密码。
如果您没有帐户,请注册。

帐户信息 用户名: *

密码: *

让我登录


只需复制以下设计并将其放入aspx即可

<h2>
    Log In
</h2>
<p>
    Please enter your username and password.
    <asp:HyperLink ID="RegisterHyperLink" runat="server" EnableViewState="false">Register</asp:HyperLink> if you don't have an account.
</p>
<asp:Login ID="LoginUser" runat="server" EnableViewState="false" RenderOuterTable="false">
    <LayoutTemplate>
        <span class="failureNotification">
            <asp:Literal ID="FailureText" runat="server"></asp:Literal>
        </span>
        <asp:ValidationSummary ID="LoginUserValidationSummary" runat="server" CssClass="failureNotification" 
             ValidationGroup="LoginUserValidationGroup"/>
        <div class="accountInfo">
            <fieldset class="login">
                <legend>Account Information</legend>
                <p>
                    <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">Username:</asp:Label>
                    <asp:TextBox ID="UserName" runat="server" CssClass="textEntry"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName" 
                         CssClass="failureNotification" ErrorMessage="User Name is required." ToolTip="User Name is required." 
                         ValidationGroup="LoginUserValidationGroup">*</asp:RequiredFieldValidator>
                </p>
                <p>
                    <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Password:</asp:Label>
                    <asp:TextBox ID="Password" runat="server" CssClass="passwordEntry" TextMode="Password"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password" 
                         CssClass="failureNotification" ErrorMessage="Password is required." ToolTip="Password is required." 
                         ValidationGroup="LoginUserValidationGroup">*</asp:RequiredFieldValidator>
                </p>
                <p>
                    <asp:CheckBox ID="RememberMe" runat="server"/>
                    <asp:Label ID="RememberMeLabel" runat="server" AssociatedControlID="RememberMe" CssClass="inline">Keep me logged in</asp:Label>
                </p>
            </fieldset>
            <p class="submitButton">
                <asp:Button ID="LoginButton" runat="server" CommandName="Login" Text="Log In" ValidationGroup="LoginUserValidationGroup"/>
            </p>
        </div>
    </LayoutTemplate>
</asp:Login>

登录

请输入您的用户名和密码。
如果您没有帐户,请注册。

帐户信息 用户名: *

密码: *

让我登录


让标题指向登录表的最简单方法是

字段集和图例

<!DOCTYPE html>
<html>
<head>
<style>
fieldset {position: relative; width:50%}
legend {color:#893039 }
</style>
</head>
<body>
<fieldset>
  <legend align="center">Login App:</legend>
<table>  
  <tr>
    <td>Name</td>
    <td><input type="text"></td>
  </tr>
  <tr>
    <td>Password</td>
    <td><input type="password"></td>
  </tr>
</table>
</fieldset>
</body>
</html>

字段集{位置:相对;宽度:50%}
图例{颜色:#893039}
登录应用程序:
名称
密码
工作示例在JSFIDLE中的以下链接中给出:


让标题指向登录表的最简单方法是

字段集和图例

<!DOCTYPE html>
<html>
<head>
<style>
fieldset {position: relative; width:50%}
legend {color:#893039 }
</style>
</head>
<body>
<fieldset>
  <legend align="center">Login App:</legend>
<table>  
  <tr>
    <td>Name</td>
    <td><input type="text"></td>
  </tr>
  <tr>
    <td>Password</td>
    <td><input type="password"></td>
  </tr>
</table>
</fieldset>
</body>
</html>

字段集{位置:相对;宽度:50%}
图例{颜色:#893039}
登录应用程序:
名称
密码
工作示例在JSFIDLE中的以下链接中给出:


您不能将标签放在登录表上方吗?另外,将JSFIDLE与您的代码链接在一起,我们将对其进行编辑correct@SamDenton我尝试使用h1标签,但后来出现了填充问题,我不太习惯css,所以仍然在练习。谢谢你的JSFIDLE建议,我们以后会使用它吗?难道你不能把标签放在登录表的上面吗?另外,把一个JSFIDLE和你的代码链接在一起,我们会把它编辑成correct@SamDenton我尝试使用h1标签,但后来出现了填充问题,我不太习惯css,所以仍然在练习。谢谢你的建议,我会用它的谢谢这是我一直在寻找的!fieldset标签似乎是这方面的完美标签!谢谢,这就是我要找的!fieldset标签似乎是这方面的完美标签!