Introduction
What is html?
Html stands for Hyper Text Markup Language. It is a markup language for web pages or browsers. A markup lanuage is not a programming lauguage, instead it consists of markup text that is distinguishable from other text in the document.
Like programming languages, html do follow some rules in a standard format. Almost all webpages are written in html in one way or other.
What are html documents consist of?
An html document primarily consists of elements, which are made of tags. Basically, an element starts with an opening tag, then has content followed by a closing tag. Don't worry about elements and tags now, we will discuss them in later sections.
How do i write html code?
Html documents are written in plain text format. This means that you don't need some special editor to write html documents and any plain text editor can do the job. Although a web development software like Dreamweaver, Aptana studio or Cofee cup do has important benefits.
To run the code, we save the document with an htm or html extension and then open the document in a web browser.
Html or Xhtml?
The W3C specification of Html started from version 3.2 to version 4.01, which is the last version of Html. Shortly after that, XHTML 1.0 was created, which is a reformulated version of Html 4.01 using XML 1.0. It has since moved on to version XHtml 5.
There is a lot of similarity between Html or Xhtml and so are a few differences. Both languages support three flavors, Strict, Transitional and Frameset. We will see these later.
XHtml is more standardized than Html and enforces a few rules to be followed. These include,
- A closing tag must be present for non-empty tags.
- Empty elements are terminated with a space, followed by a slash, follwed by angle bracket.
- Elements and Attribute names must use lower case letters.
- Quotation marks must be used for attribute values.
- Attribute minimization is not allowed in Xhtml.
In this guide, i will follow XHtml because i find Xhtml to be well formed, consistent and defined for future.
Next:
Related:
Link to this page :
Copy and paste the following code in an html document to link to this page,