navigation bar: This tag is used to start making a form
label: This tag is used to define a label for form element
input: This tag is used to get input data from the form
button: This tag is used to create a button which can be click to perform some action
select: This tag is used to create a drop-down selectable list
textarea: This tag is used to create a bigger text input field to take input from users
fieldset: This tag is used to group simillar type of fields
legend: This tag is used to caption the fieldset element
datalist: It is used to specify pre-defined list options for input control
output: This tag is used to display the output of the performed operation
option: This tag is used to define options in the dropdown list.
Following is the hierarchy required for the tags:
- form is created first inside the body to start making the form.
- rest all options can be defined anywhere inside the form element except
- option needs to be present inside a tag where options are available
Code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<style>
@import url('https://fonts.googleapis.com/css2?family=Mountains+of+Christmas');
body {
margin: 0;
height: 100vh;
display: grid;
place-items: center;
}
h1 {
position: absolute;
font-family: 'Mountains of Christmas', cursive;
color: red;
font-size: 80px;
}
img {
max-width: 100%;
height: auto
}
</style>
</head>
<body>
<img src="img/grass_sides.png" class="img-fluid" alt="grass">
<h1>Merry Christmas!</h1>
</body>
</html>
Output