More about quarks

Image by MissMJ, Fermi Lab, USA (via Wikimedia Commons).
Latest consensus for particle masses available at:

There are 6 types of the fundamental particles known as quarks, which are named: up, down, charm, strange, top and bottom. There is no evidence for any quarks being composed of anything even smaller.

Of these, the up and down particles are the lightest and most stable. These are the ones that combine to make protons and neutrons.

Protons and neutrons are both types of 'baryons" and baryons themselves are one of the types of "hadrons". 

A proton is composed of two up and one down quark particles. A neutron is composed of two down quarks and one up quark. 

Quarks within a proton i.e. two up quarks & one down, linked by gluons (which carry the "strong force"). Total charge: 1

Composition of a neutron i.e. one up quark and two down quarks, linked by gluons. Total charge: 0.
Image: Arpad Horvath (via Wikimedia Commons)

Adding up the charges:

Up particles each have a charge of 2/3, whereas a down particle has a charge of -1/3. So, two up particles have a total charge of 4/3 and when added to a down particle (as shown above), the total charge of the proton is 1.  

In a neutron, the two down particles have a total charge of -2/3 and when added to a single up particle, the total resulting charge is 0.