QTP vs Selenium

Invention:
QTP: It is a HP mercury product.
Selenium : It is developed by Jason Huggins, and is a ThougtWorks product.

Software:
QTP: It is a Paid and licensed tool from HP
Selenium : It  is a Open Source tool available under Apache license.

Application:
QTP supports automation of both Windows and Web applications
Selenium supports only Web based applications.

Type of Tool:
QTP is a Functional and Regression tool.
Selenium is also functional and Tool.

Flavors:
QTP  has only one type of software but has several plugins that supports for various types of automation including Flex applications.
Selenium : Selenium has three flavors - Selenium IDE, Selenium RC and Selenium Grid.

Parallel Execution:
QTP does not support multiple run of automated scripts.
Selenium has type of software called Selenium Grid that supports the parallel execution of automation scripts with multiple browsers and multiple systems.

Coding:
QTP  runs on VB scripting and also supports for various programming languages.
Selenium runs on various languages  like Java, Perl, Python, C#, Junit etc.

Record and playback:
QTP : It has record and playback feature through which we can record not only web application actions but also Windows applications actions.
Selenium : Selenium IDE itself is a Record and playback tool , through which we can record and also export those actions in form of a test case in various languages like Java, Python, Perl, Ruby, C# etc..

Testplan :
QTP has a plugin of QC which has test plans and can be run at a time.
Selenium IDE has a feature which supports for run of all test scripts at a time.

Headless Execution:
QTP does not have any feature such.
selenium has a extension or driver called HtmlUnit which simulates the browser properties and execute scripts without invoking the browser.


Objects Identification:
QTP has "are ObjectSpy" that reveals the object properties to automate the set of actions performed on elements.
Selenium does not have any object spy but there many opensource plugins that can identify the web elements properties (Ex: FireBug for FF browser, IDeveloper for IE browser, Xpather and XPathFinder etc..)