Anchors are inline elements and are therefore always aligned right They are also always aligned left and center as well
An inline element is only as wide as the content it contains so text-alignment doesn’t apply because there is no where to move it to.
If you set the anchor to display:block then it will fill the available horizontal space and then the text-alignment will work. Or alternatively apply the text-alignment to the block parent instead (#container)