  We estimate the constraints of observational mass and redshift on the
properties of equations of state for quarks in the compact stars. We discuss
two scenarios: strange stars and hybrid stars. We construct the equations of
state utilizing MIT bag model taking medium effect into account for quark
matter and relativistic mean field theory for hadron matter. We find that quark
may exist in strange stars and the interior of neutron stars, and only these
quark matters with stiff equations of state could be consistent with both
constraints. The bag constant is main one parameter that affects the mass
strongly for strange stars and only the intermediate coupling constant may be
the best choice for compatibility with observational constraints in hybrid
stars.
