HTML 5 - Features
HTML 5 - Features
Page layout is the part of graphic design that deals with the
arrangement of visual elements on a page. Page layout is used to make
the web pages look better. It establishes the overall appearance,
relative importance, and relationships between the graphic elements to
achieve a smooth flow of information and eye movement for
maximum effectiveness or impact.
Example:
<!DOCTYPE html>
<html>
<head>
<title>Page Layout</title>
<style>
.head1 {
font-size:40px;
color:#009900;
font-weight:bold;
}
.head2 {
font-size:17px;
margin-left:10px;
margin-bottom:15px;
}
body {
margin: 0 auto;
background-position:center;
background-size: contain;
}
.menu {
position: sticky;
top: 0;
background-color: #009900;
padding:10px 0px 10px 0px;
color:white;
margin: 0 auto;
overflow: hidden;
}
.menu a {
float: left;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 20px;
}
.menu-log {
right: auto;
float: right;
}
footer {
width: 100%;
bottom: 0px;
background-color: #000;
color: #fff;
position: absolute;
padding-top:20px;
padding-bottom:50px;
text-align:center;
font-size:30px;
font-weight:bold;
}
.body_sec {
margin-left:20px;
}
</style>
</head>
<body>
create web apps easily. It can provide some advanced features which are not
Advantages of HTML5
5. JavaScript, HTML, and CSS are the main programming languages for
web applications.
8. Easy to write
9. Easy to understand
10.Easy to use
<form>
<label for="firstname"> First Name: </label>
<input type="text" name="firstname" id="firstname"
required maxlength="45">
<label for="lastname"> Last Name: </label>
<input type="text" name="lastname" id="lastname"
required maxlength="45">
<button>Submit</button>
</form>
<html>
<head>
<style>
.formData {
padding-top: 20px;
padding-bottom: 20px;
padding-left: 10px;
background-color: darkcyan;
form {
font-size: 30px;
form input {
margin-left: 10px;
font-size: 15px;
</style>
</head>
<body>
</form>
</div>
</body>
</html>
Max
Required
It’s available
to text, search, url, tel, email, password, date, datetime, datetime-local,
month, week, time, number, checkbox, radio, file, and also on
the <select> and <textarea> elements.
Step
Minlength
Maxlength
The simplest change you can make to your forms is to mark a text
input field as 'required':
Your Name: <input type="text" name="name" required>
Your Name:
Before you type anything into the box a red marker is shown. As
soon as a single character has been entered this changes to a green
marker to indicate that the input is 'valid'.
Using CSS you can place markers inside or alongside the input box,
or simply use background colors and borders as some browsers do
by default.
This is where HTML5 really gets interesting and more useful. Along
with the text input type, there are now a host of other options,
including email, url, number, tel, date and many others.
INPUT type="email"
Note that for this example we've made use of another HTML5
attribute placeholder which lets us display a prompt or instructions
inside the field - something that previously had to be implemented
using messy onfocus and onblur JavaScript events.
Email Address:
Website:
+">
Now our input box will only accept text starting
with http:// or https:// and at least one additional character:
value="3">
As with other HTML5 input types, browsers that don't recognise the
new options will default to simple text inputs. For that reason it's a
good idea to include a size for the input box.
AgeSatisfaction (1-5)
The slider option is a bit bizarre in that no values are displayed, but
may be useful for more 'analog' inputs. There are some bugs with
the number input in that if you don't set a max value, clicking 'down'
with the input blank will result in a very large number.
and in Opera:
INPUT type="password"
color
date
datetime
datetime-local
month
search
tel
time
week