I am fairly new to web design so please bear with my lack of knowledge and possible stupid questions.
I am trying to create a login page as shown below.

I have placed the Username and Password form inside a div element which I have centred on the page. However, I haven't managed to centre the Username and Password field correctly inside this div element. I tried to place form by centering it relative to the div element in the middle of the page and placing the login to the bottom right corner however, it still doesn't work. Further, I am not able to correctly place The header "SampleWebPage" in its correct place.
Here's the CSS and HTML code for the centred div class inside which the form is placed.
.login_div {
width: 300px;
height: 300px;
/* Center form on page horizontally & vertically */
top: 50%;
left: 50%;
margin-top: -150px;
margin-left: -150px;
}
<html>
<head>
<title>Login Form</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="{{ url_for('static', filename='login.css') }}">
</head>
<body>
<div class = "login_div">
<form action="" method = "post" class="login_form">
Username:
<input type="text" name="username" value="{{
request.form.username }}">
<br>
Password:
<input type="password" name="password" value="{{
request.form.password }}">
<br>
<input class="btn btn-default" type="submit" value="Login">
</form>
</div>
</body>
</html>
I'm sorry if this is a very broad question, however I require help getting this webpage to work correctly.
Thanks.