Confused by notation of atomic number Z and mass number A on periodic table of elements
Periodic tables of elements (PTEs) are often abused by designers. Books are more trustworthy as long as they are written by scientists. Long story short, the second notation $(\ce{^{12}_{6}C})$ is the correct one.
There is an easy to remember AZE notation: $^A_Z\ce{E}$.

I suspect the PTE you were looking at lists standard (averaged) atomic weights of the elements $A_\mathrm{r}$ rounded to the nearest whole number so it may appear as if those were the mass numbers $A$, probably something like this:






  * The atomic weights listed on this Table of Elements have been rounded to the nearest whole number. As a result, this chart actually displays the mass number of a speciﬁc isotope for each element. An element's complete, unrounded atomic weight can be found on the It's Elemental website: http://education.jlaborgﬁtselemental/


Note that a good periodic table usually includes a legend which deciphers and justifies designer's choice.
Even better example is the Periodic Table of the Elements by NIST.
Despite atomic number $Z$ also located in the upper left corner of the cell, its location is typographically literate as both $Z$ and $A_\mathrm{r}$ have distinct place, different typeface and the legend unambiguously denotes which is which: