What is HTML?
HTML is a markup language used to markup or tag a document’s elements with information regarding the element's structural position. HTML is specifically for Internet-based documents, and HTML documents are usually called web pages.
How does HTML Work?
A page header in an HTML markup document might look like this;
<title>The Principles of Markup</title>.
Notice how the two tags act as a pair, forming a container around the content and describe the function of the content or text, in this case the page title. Notice also the backslash which denotes the closing tag. All content in a web page is contained within some sort of tag pair which describes the function of the content inside. When your HTML browser displays the webpage, it uses the information provided by the tags to present it correctly.
Document Flow
The flow in an HTML document is from top left to bottom right. Starting in the top-left hand corner of the documents each one will appear to the right of the previous one until there is no more space on the line, at which point the next object will go at the leftmost end of the next line.
Block and Inline
HTML tags come in two varieties; block and inline. Block elements always start a new line for themselves, and any content that follows them also starts on a new line. <p> and <h1> are familiar block level elements. Inline elements follow each other like the letters in a sentence, only beginning a new line when the run out of space on the previous one. Common examples are they <em> and <strong> tags.
The <div> and <span> tags can be used to create block and inline elements respectively. They are used to help layout a page.
