TSA liquids rule: 3.4 oz, one quart bag
In your carry-on, each liquid, aerosol, gel, cream or paste must be in a container of 3.4 oz (100 ml) or less, and all of them together must fit in one quart-size bag. Anything in a bigger container goes in checked baggage.
The limit is per container, not per amount left inside: a half-empty 6 oz bottle of sunscreen is still a 6 oz container and is not allowed. TSA says that taking the bag out of your carry-on at the checkpoint speeds up screening, and any item that alarms gets screened again.
What counts as a liquid
TSA's rule names liquids, aerosols, gels, creams and pastes. In packing terms that means drinks, shampoo and conditioner, lotion, sunscreen, toothpaste, liquid makeup, hair gel and spray deodorant. Solid bars (soap, shampoo bars, stick deodorant) are not liquids.
Exemptions
TSA lists two exemptions to the 3.4 oz limit: medications, and nourishment for infants and children. Both may come in larger containers; TSA's page sets out the screening steps for each, so read those before you pack them.
Duty-free liquids on a connecting flight
If you fly into the US and connect to another flight, duty-free liquids over 3.4 oz may stay in your carry-on when all of these apply: you bought them abroad, the shop sealed them in a transparent tamper-evident bag, the bag shows no sign of opening, and you have the original receipt from within the last 48 hours. They are still screened, and anything that alarms has to go in checked baggage. TSA itself recommends packing such liquids in checked bags anyway.
And the bag itself
The liquids rule says nothing about the bag's size. That depends on the airline: see the carry-on size by airline table, or put your bag's measurements into the bag check.