What is HTML?
To make a long story short, HTML was invented in 1990s by a scientist called Tim Berners-Lee. The purpose was to make it easier for scientists at different universities to gain access to each other’s research documents. The project became a bigger success than Tim Berners-Lee had ever imagine. By inventing HTML he laid the foundation for the web as we know it today. The first version of HTML – version 2.0 was published in 1995, the second version 3.2 was published in 1997, the third version 4.0 was published in 1998 and the latest version of HTML5 was published in 2014. In this tutorial we are going to learn HTML5.
HTML is a language for describing web pages. HTML stands for Hyper Text Mark-up Language. It is the primary language that’s used to create web pages, so you will come to know it very well through this course. We will be using the latest version of HTML, which is called HTML5. HTML is not a programming language, it is a mark-up language. A mark-up language is a set of mark-up tags. HTML uses mark-up tags to describe web pages. For example, <p>I am a paragraph<⁄p> this tag describes paragraph in a web page document.
The Structure of HTML
The DOCTYPE (Document Type Declaration).Is Mandatory. An HTML document must have a HTML DOCTYPE declaration. It must absolutely be the first item on a web page, appearing even before any spacing or carriage returns. The doctype’s job is to specify which version of html the browser should expect to see. The browser uses this information to decide how it should render items on the screen. The doctype above states that we are using HTML 5, the latest version of HTML. In HTML5 there is only one <!doctype> declaration, and it is very simple:<!DOCTYPE html>
The head element
The body element
Finally, we get to the place where it all happens! The body element of the page contains almost everything that you see on the screen, including headings, paragraphs, images, any navigation that’s required, and footers that sit at the bottom of the web page.
Dividing up the body into different content boxes
The <div> tag is use to define a division or a section in an HTML document. It is used to group block-elements to format them with styles. The <div> element is used together with CSS, to layout a web page. There are 2 divisions <div> attributes; the id attribute and the class attribute.
<div id=”container”> </div>
Unlike ID's, they can be used multiple times in the same HTML document. If you have multiple elements that are in some way similar, you should use the elements class to identify them.
<div class=”header”> </div>