Six types of basic elements
A valid contract requires: (1) an agreement; (2) an intention to create legal relations; and(3) consideration (unless the Contract is made by deed). Whilst each of these threerequirements receives separate treatment, they must in reality be looked at together.
The word ‘contract’ maybe defined as ‘an agreement enforceable by law’ in Section 2(b) of the Contract Act 1950. In simple means, a contract is a legal agreement between two or more parties. So in the making contract process, the beginning steps to make a contract is requires offer and acceptance .When one party makes an offer, other party accepts the terms and the conditions of this offer, then an agreement will just be done.
There are six types of basic elements which are offer, acceptance of the offer intention to create legal relations, consideration, certainty and capacity is the requirements to form a legal binding contract.
Firstly, to form an agreement it is necessary an offer or proposal and an acceptance of it. There should clearly specify any terms and conditions that between two parties agree on. The parties must have the necessary capacity to contract and the contract must not be trifling, indeterminate, impossible or illegal. Contracts may be either oral or written. A written contract would cause the less possibility for misunderstandings and gives us a better chance of recourse should the other contracting parties breach the terms and conditions of the contract.
Under the Contracts Act 1950 and English law, a proposal or offer which is something that capable of being converted into an agreement by its acceptance. The promise must be definite to be bound provided certain specified terms are accepted by a proposal. In Section 2(c) of the Contract Act 1950, the person making the proposal is call ‘promisor’ or ‘offeror’. The promisor must have declared his readiness to undertake an obligation upon certain terms, leaving the option of its acceptance or refusal to the offeree, which is the person who had accepted the offer that offeror given. In the Federal Court case of Affin Credit (Malaysia) Sdn. Bhd. v. Yap Yuen Fui,  where there was a lack of offer and acceptance, the purported hire-purchase agreement was declared, the was void from the beginning.
An offer to be valid, with particular attention to the contents of the offer must be specifically identified, such as price, quantity, quality, and other basic provisions. However, an offer maybe express orally or even implied. An offer when accepted becomes a promise. According to Section 4(1) of the Contracts Act 1950, the communication of a proposal is complete when it comes to the knowledge of the person to whom it is made. On the other hand, an offer should be contrasted with an option  and an advertisement. An option is merely an undertaking to keep the offer open for a certain period of time while an advertisement is an attempt to induce offers – Coelho v.The Public Services Commission  and Guha Majumder v. Donough. 
The court has held that advertisements of bilateral contracts are not offers but advertisements of unilateral contracts are construed to be offers. For instance, case Partridge v.Crittenden  shown that an advertisement in the newspaper for the post regarded as an invitation to negotiate and not an offer So in order to justified whether an advertisement is an offer or an invitation to treat, it is depends on the intention of the parties in each case.
As a general rule, “what must be accepted is what was offered", it exclusive of addition, deletion, or qualification. Acceptance may be express orally from the offeree’s conduct. In communication of acceptance, general rule normally claimed that the offeror receives the acceptance is occurs when the time and where the place. However, during the nineteenth century, postal rule is a well-known legal principle in contract law. The postal rule is one major exception to the rule that acceptance must be communicated. Postal rule is define that “postal service is an acceptable method of communication between offeror and offeree. If a letter of acceptance takes effect immediately upon posting, rather than upon receipt , and acceptance is therefore taken to have been communicated at the time of posting the letter" .
Consequently, acceptance must be unqualified and absolute assent to the terms of the offer. The case Carlill v. Carbolic Smoke Ball Company  is an example of a 'unilateral contract', where an offer is made to the whole world and acceptance comes from particular people upon their fulfillment of the contractual terms or the condition precedent. Besides that, acceptance also must be express unconditional and made within a reasonable time such as the case Fraser v. Evereet. 
As a general rule, a revocation of an offer must be communicated in order to be effective. Revocation will happen if the acceptance is not completed. However, an agreement is formed when acceptance is complete, so that there is no question of revocation.
Secondly, intention to create legal relation is show that the two parties must have intention to be bound by the terms of their agreement. An agreement is not a contract in the strict sense unless it is legally enforceable.
In other words, there have two types of agreement which is domestic agreement and the commercial agreement. The courts will presume that agreement between children and family member is intended to unenforceable on the basis of public policy as found in case Balfour v. Balfour.  By the way, the commercial arrangements are rebut presumed to be intended legal relationship .The strength of the presumption that issue is rarely arises in commercial litigation in the case Esso Petroleum Co. Ltd. v. Customs & Excise Commissioner. 
Thirdly, consideration is known as the ‘price of promise’. It is shown that benefit or detriment in the exchange process, there must have been a bargain between the parties. For a simple example, Susan goes to shop buy clothes. And she pays the money for the clothes to cashier. She loses her money but gains clothes. On the other hands, the shop looses the clothes but gains the money. Each side is providing something in exchange.
As a general rule, for any contract without consideration is void. The High Court held the Guthrie Waugh Bhd. v. Malaippan Muthucumaru  that there was no cause of action in the statement of claims as the claim was based on a deed of arrangement for which there was no consideration. Under the Malaysian Law, the consideration need not be adequate and has to be nominal. In such case Phang Swee Kim v. Beh I Hock  , the inadequacy of the consideration may be taken into account by the court to determine whether the situation of the promisor was freely given.Contracts in which the consideration of one party greatly exceeds that of another may nevertheless be held invalid for lack of real consideration.
The consideration also must not be from past. For instance, from the case Eastwood v. Kenyon  , it was held that a past consideration. As after the girl marriage, the guardian could not enforce the promise because taking out the loan to raise because her husband has promised to pay the loan.
Conclusion, all the essential components elements is needed to form a valid contract. An agreement to set up valid and legal binding contract must contain these three important elements. In order to defend a contract in a court of law, each of these elements is necessity. During this increasing in the number of businesses (including e-commerce), we need to know the important of contract law because knowledge of contract law can protect consumers and businesses from misunderstandings. The definition of each in detail assists in protecting all parties to a contract and is conducive to good business. If any of the absence of any agreement will not have a legal action resulting from violation, so all of those elements must be looked at in totality.