12
readers helped!

This helped me

How to Create a Login Page in HTML

You can hide content behind login pages with just a press of a button in WordPress, and you can find many plug-ins and services that provide those login pages so you don't have to code. To make your login page works without the one-click ease of WordPress, you'll need to create multiple users on your site and you will need to change permissions to view the site from public to private. This How.com.vn will show you how to create the basics of a login page in HTML.

Steps

  1. How.com.vn English: Step 1  Open a text editor.
    Windows and Mac computers come with default text editor programs that will work to create or edit HTML.
    • If you're using Windows, you can use Notepad, which you can search for in the start menu, or try installing the more fully featured Notepad++.
    • If you're using a Mac, you can use TextEdit, which you can search in Spotlight.
  2. Step 2 Type “<section class="loginform cf">” and press ↵ Enter.
    This indicates the beginning of your login page code.
  3. How.com.vn English: Step 3  Type the following code to create a login page skeleton:
    <form name="login" action="index_submit" method="get" accept-charset="utf-8">  <ul>    <li><label for="usermail">Email</label>    <input type="email" name="usermail" placeholder="[email protected]" required></li>    <li><label for="password">Password</label>    <input type="password" name="password" placeholder="password" required></li>    <li>    <input type="submit" value="Login"></li>  </ul></form></section>
    • The “placeholder” text appears in the text field until it is active. It gives an example of what you're looking for in the textbox.
    • The “required” tag is optional, but it warns the user if they didn't finish filling in a field that it is required.[1]
    • Make sure you close all the open tags. Your code will look funny if you didn't close one.
  4. How.com.vn English: Step 4  Save and close the text editor.
    Make sure your file saves as .html instead of .txt.[2]
    Advertisement

Community Q&A

Search
Add New Question
  • Question
    Where is the signup page?
    How.com.vn English: Community Answer
    Community Answer
    There is no signup page because it has not been programmed. You need an additional element within the signup fields.
  • Question
    How do I add a 'Create Account' button? And, How do I make the login button direct me off the page if the login was correct?
    How.com.vn English: A_random_reader
    A_random_reader
    Community Answer
    Use the "action" attribute. For the below code to work, you should have PHP installed on your server/computer. login.html: action.php.
  • Question
    How to make a login for social media?
    How.com.vn English: A_random_reader
    A_random_reader
    Community Answer
    It is likely that you mean "log in with social media" and want to create something like a "Log in with Facebook" button. To do this, you might need to contact Facebook/Twitter and get them to give you the API code.
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit

      Advertisement

      About this article

      How.com.vn English: Darlene Antonelli, MA
      Written by:
      How.com.vn Technology Writer
      This article was co-authored by How.com.vn staff writer, Darlene Antonelli, MA. Darlene Antonelli is a Technology Writer and Editor for How.com.vn. Darlene has experience teaching college courses, writing technology-related articles, and working hands-on in the technology field. She earned an MA in Writing from Rowan University in 2012 and wrote her thesis on online communities and the personalities curated in such communities. This article has been viewed 27,702 times.
      How helpful is this?
      Co-authors: 4
      Updated: September 6, 2019
      Views: 27,702
      Article SummaryX

      1. Open a text editor.
      2. Type the code.
      3. Save the file.

      Did this summary help you?

      Thanks to all authors for creating a page that has been read 27,702 times.

      Is this article up to date?

      ⚠️ Disclaimer:

      Content from Wiki How English language website. Text is available under the Creative Commons Attribution-Share Alike License; additional terms may apply.
      Wiki How does not encourage the violation of any laws, and cannot be responsible for any violations of such laws, should you link to this domain, or use, reproduce, or republish the information contained herein.

      Notices:
      • - A few of these subjects are frequently censored by educational, governmental, corporate, parental and other filtering schemes.
      • - Some articles may contain names, images, artworks or descriptions of events that some cultures restrict access to
      • - Please note: Wiki How does not give you opinion about the law, or advice about medical. If you need specific advice (for example, medical, legal, financial or risk management), please seek a professional who is licensed or knowledgeable in that area.
      • - Readers should not judge the importance of topics based on their coverage on Wiki How, nor think a topic is important just because it is the subject of a Wiki article.

      Advertisement