The below code demonstrate simple HTML page.
Example:
<!DOCTYPE html> <html> <head> <title>HTML Page</title> </head> <body> Hi, This is Simple HTML page. </body> </html>
Result
By running the above code in a preferred browser user can get the following output as shown in below image.
HTML document is a plain text file which is encoded in HTML language. A browser is used to decode the HTML text file and establish (or translate) it to the user. HTML document is build by the html tags, by using these tags browser can determine the format of the text.
<starting tag> content </ending tag>
Html tags are normally defined in pair tags. The end tag is same like as a starting tag but end tag starts with slash (“ / ”).
The figure below demonstrate the few starting and ending tags used in HTML document.
HTML Version | Year | Description |
---|---|---|
Version 2.0 | 1995 | Version 2.0 was a standard version defined by working group of HTML |
Version 3.2 | 1997 | Recommended by World Wide Web Consortinum (W3C) |
Version 4.01 | 1999 | Recommended by World Wide Web Consortinum (W3C) |
Version 5 | 2014 | Recommended by World Wide Web Consortinum (W3C) |
Version 5.1 | 2016 | Recommended by World Wide Web Consortinum (W3C) |
The image below demonstrate the basic structure of HTML document.
HTML5 is the latest version which supports all the html controls of previous version and it come up with advanced tags like video, section, article. HTML5 has more user friendly tags that anyone can easily understand.
HTML5 basic example.
<!Doctype> <html> <header> <nav> <ul> <li>Home</li> <li>About Us</li> <li>Gallery</li> <li>Contact US</li> </ul> </nav> </header> <section> <aside>Left Side Section</aside> <aside>Right Side Section</aside> </section> <footer> Footer Section <footer> </html>
Result
By running the above code in a preferred browser user can get the following output as shown in below image.