The History of HTML
HTML was first created by Tim Berners-Lee, Robert Cailliau, and others starting
in 1989. It stands for Hyper Text Markup Language.
Hypertext means that the document contains links that allow the reader to jump to
other places in the document or to another document altogether. The latest version is
known as HTML5.
A Markup Language is a way that computers speak to each other to control how text is
processed and presented. To do this HTML uses two things: tags and attributes.
What are Tags and Attributes?
Tags and attributes are the basis of HTML.
They work together but perform different functions – it is worth investing 2 minutes
in differentiating the two.
What Are HTML Tags?
Tags are used to mark up the start of an HTML element and they are usually
enclosed in angle brackets. An example of a tag is: <h1>.
Most tags must be opened <h1> and closed </h1> in order to function.
What are HTML Attributes?
Attributes contain additional pieces of information. Attributes take the form of an
opening tag and additional info is placed inside.
An example of an attribute is:
<img src="[Link]" alt="A photo of my dog.">
In this instance, the image source (src) and the alt text (alt) are attributes of
the <img> tag.
Golden Rules To Remember
1. The vast majority of tags must be opened (<tag>) and closed (</tag>) with the element
information such as a title or text resting between the tags.
2. When using multiple tags, the tags must be closed in the order in which they were
opened. For example:
<strong><em>This is really important!</em></strong>
<!DOCTYPE html>
<html lang="en">
<!-- Head Section Content -->
<head>
<!-- Page title -->
<title>Basic form design using HTML</title>
</head>
<!-- Body Section Content -->
<body>
<!-- Heading Content -->
<h1>GeeksforGeeks</h1>
<h3>Basic form design using HTML</h3>
<!-- Creating a from -->
<form action="#">
<fieldset>
<legend>Personal Details</legend>
<!-- Label and input field -->
<p>
<label>First name : <input name="firstName" /></label>
</p>
<p>
<label>Last name : <input name="lastName" /></label>
</p>
<!-- Label and radio button field -->
<p>
Gender :
<label><input type="radio" name="gender"
value="male" /> Male</label>
<label><input type="radio" name="gender"
value="female" /> Female</label>
</p>
<p>
<label>Email : <input type="email"
name="email" /></label>
</p>
<p>
<label>Date of Birth : <input type="date"
name="birthDate"></label>
</p>
<!-- Label and textarea field -->
<p>
<label>Address :
<br />
<textarea name="address" cols="30"
rows="3"></textarea>
</label>
</p>
<!-- Creating a button -->
<p>
<button type="submit">Submit</button>
</p>
</fieldset>
</form>
</body>
</html>