At common law, the elements of a contract are; offer, acceptance, intention to create legal relations, consideration, and legality of both form and content.
Not all agreements are necessarily contractual, as the parties generally must be deemed to have an intention to be legally bound. A so-called gentlemen's agreement is one which is not intended to be legally enforceable, and "binding in honour only".
Offer and acceptance
In order for a contract to be formed, the parties must reach mutual assent (also called a meeting of the minds). This is typically reached through offer and an acceptance which does not vary the offer's terms, which is known as the "mirror image rule". An offer is a definite statement of the offeror's willingness to be bound should certain conditions be met. If a purported acceptance does vary the terms of an offer, it is not an acceptance but a counteroffer and, therefore, simultaneously a rejection of the original offer. The Uniform Commercial Code disposes of the mirror image rule in §2-207, although the UCC only governs transactions in goods in the USA. As a court cannot read minds, the intent of the parties is interpreted objectively from the perspective of a reasonable person, as determined in the early English case of Smith v Hughes . It is important to note that where an offer specifies a particular mode of acceptance, only an acceptance communicated via that method will be valid.
Contracts may be bilateral or unilateral. A bilateral contract is an agreement in which each of the parties to the contract makes a promise or set of promises to each other. For example, in a contract for the sale of a home, the buyer promises to pay the seller $200,000 in exchange for the seller's promise to deliver title to the property. These common contracts take place in the daily flow of commerce transactions, and in cases with sophisticated or expensive precedent requirements, which are requirements that must be met for the contract to be fulfilled.
Less common are unilateral contracts in which one party makes a promise, but the other side does not promise anything. In these cases, those accepting the offer are not required to communicate their acceptance to the offeror. In a reward contract, for example, a person who has lost a dog could promise a reward if the dog is found, through publication or orally. The payment could be additionally conditioned on the dog being returned alive. Those who learn of the reward are not required to search for the dog, but if someone finds the dog and delivers it, the promisor is required to pay. In the similar case of advertisements of deals or bargains, a general rule is that these are not contractual offers but merely an "invitation to treat" (or bargain), but the applicability of this rule is disputed and contains various exceptions. The High Court of Australia stated that the term unilateral contract is "unscientific and misleading".
In certain circumstances, an implied contract may be created. A contract is implied in fact if the circumstances imply that parties have reached an agreement even though they have not done so expressly. For example, John Smith, a former lawyer may implicitly enter a contract by visiting a doctor and being examined; if the patient refuses to pay after being examined, the patient has breached a contract implied in fact. A contract which is implied in law is also called a quasi-contract, because it is not in fact a contract; rather, it is a means for the courts to remedy situations in which one party would be unjustly enriched were he or she not required to compensate the other. Quantum meruit claims are an example.
Invitation to treat
Where something is advertised in a newspaper or on a poster, the advertisement will not normally constitute an offer but will instead be an invitation to treat, an indication that one or both parties are prepared to negotiate a deal.
The Carbolic Smoke Ball offer
An exception arises if the advertisement makes a unilateral promise, such as the offer of a reward, as in the famous case of Carlill v Carbolic Smoke Ball Co, decided in nineteenth-century England. The company, a pharmaceutical manufacturer, advertised a smoke ball that would, if sniffed "three times daily for two weeks", prevent users from catching the 'flu. If the smoke ball failed to prevent 'flu, the company promised that they would pay the user £100, adding that they had "deposited £1,000 in the Alliance Bank to show our sincerity in the matter". When Mrs Carlill sued for the money, the company argued the advert should not be taken as a serious, legally binding offer; instead it was a "mere puff"; but the Court of Appeal held that it would appear to a reasonable man that Carbolic had made a serious offer, and determined that the reward was a contractual promise.
Although an invitation to treat cannot be accepted, it should not be ignored, for it may nevertheless affect the offer. For instance, where an offer is made in response to an invitation to treat, the offer may incorporate the terms of the invitation to treat (unless the offer expressly incorporates different terms). If, as in the Boots case, the offer is made by an action without any negotiations (such as presenting goods to a cashier), the offer will be presumed to be on the terms of the invitation to treat.
Auctions are governed by the Sale of Goods Act 1979 (as amended), where section 57(2) provides: “A sale by auction is complete when the auctioneer announces its completion by the fall of the hammer, or in other customary manner. Until the announcement is made any bidder may retract his bid”.
Entry into contracts online has become common. Many jurisdictions have passed e-signature laws that have made the electronic contract and signature as legally valid as a paper contract.
In India, E-contracts are governed by the Indian Contract Act (1872), according to which certain conditions need to be fulfilled while formulating a valid contact. Certain sections in information Technology Act (2000) also provide for validity of online contract.
In some U.S. states, email exchanges have become binding contracts. New York courts in 2016 held that the principles of real estate contracts to apply equally to electronic communications and electronic signatures, so long as “its contents and subscription meet all requirements of the governing statute” and pursuant to the Electronic Signatures and Records Act (ESRA). 
Intention to be legally bound
In commercial agreements it is presumed that parties intend to be legally bound unless the parties expressly state the opposite as in a heads of agreement document. For example, in Rose & Frank Co v JR Crompton & Bros Ltd an agreement between two business parties was not enforced because an 'honour clause' in the document stated "this is not a commercial or legal agreement, but is only a statement of the intention of the parties".
In contrast, domestic and social agreements such as those between children and parents are typically unenforceable on the basis of public policy. For example, in the English case Balfour v. Balfour a husband agreed to give his wife £30 a month while he was away from home, but the court refused to enforce the agreement when the husband stopped paying. In contrast, in Merritt v Merritt the court enforced an agreement between an estranged couple because the circumstances suggested their agreement was intended to have legal consequences.
A concept of English common law, consideration is required for simple contracts but not for special contracts (contracts by deed). The court in Currie v Misa  declared consideration to be a “Right, Interest, Profit, Benefit, or Forbearance, Detriment, Loss, Responsibility”. Thus, consideration is a promise of something of value given by a promissor in exchange for something of value given by a promisee; and typically the thing of value is goods, money, or an act. Forbearance to act, such as an adult promising to refrain from smoking, is enforceable only if one is thereby surrendering a legal right.
In Dunlop v. Selfridge Lord Dunedin adopted Pollack's metaphor of purchase and sale to explain consideration. He called consideration 'the price for which the promise of the other is bought'.
In colonial times, the concept of consideration was exported to many common law countries, Roman law-based systems neither require nor recognise consideration, and some commentators have suggested that consideration be abandoned, and estoppel be used to replace it as a basis for contracts. However, legislation, rather than judicial development, has been touted as the only way to remove this entrenched common law doctrine. Lord Justice Denning famously stated that "The doctrine of consideration is too firmly fixed to be overthrown by a side-wind." In the United States, the emphasis has shifted to the process of bargaining as exemplified by Hamer v. Sidway (1891).
but it is unknown in Scotland and in civil law jurisdictions.
Courts will typically not weigh the "adequacy" of consideration provided the consideration is determined to be "sufficient", with sufficiency defined as meeting the test of law, whereas "adequacy" is the subjective fairness or equivalence. For instance, agreeing to sell a car for a penny may constitute a binding contract (although if the transaction is an attempt to avoid tax, it will be treated by the tax authority as though a market price had been paid). Parties may do this for tax purposes, attempting to disguise gift transactions as contracts. This is known as the peppercorn rule, but in some jurisdictions, the penny may constitute legally insufficient nominal consideration. An exception to the rule of adequacy is money, whereby a debt must always be paid in full for "accord and satisfaction".
However, consideration must be given as part of entering the contract, not prior as in past consideration. For example, in the early English case of Eastwood v. Kenyon , the guardian of a young girl took out a loan to educate her. After she was married, her husband promised to pay the debt but the loan was determined to be past consideration. The insufficiency of past consideration is related to the preexisting duty rule. In the early English case of Stilk v. Myrick , a captain promised to divide the wages of two deserters among the remaining crew if they agreed to sail home short-handed; however, this promise was found unenforceable as the crew were already contracted to sail the ship. The preexisting duty rule also extends to general legal duties; for example, a promise to refrain from committing a tort or crime is not sufficient.