How do I make an "a href" tag centered?

2 days ago 7
ARTICLE AD BOX

I'm trying to make the "a href" tag centered in my project, but I don't know how to do that.

This is what I want it to look like:

And this is what mine looks like:

And heres my code

<!DOCTYPE html> <html> <head> <title>Colleges</title> <style> body{ background-image:url("https://codehs.com/uploads/6df376d8bee7e0fde56acba4600f70d0"); background-attachment:fixed; background-size:cover; padding:10px; } h1{ color:#021303; text-align:Center; font:90px MV Boli,rage; } img{ width:450px; height:350px; } img.center{ display:block; margin-left:auto; margin-right:auto; } img.right{ float:right; margin-left:15px; margin-bottom:15px; } img.header{ border:none; } br.right{ clear:right; } hr{ border-style:outset; border-width:5px; border-color:#0d1d10; background-color:#154217; height:8px; } ol,ul{ font:20px MV Boli; color:#073d0a; } ol.ur{ list-style-type:upper-roman; } a:link, a:visited, a:active{ font: 25px MV Boli; background-color:#cccccc; color:#073d0a; text-align:center; text-decoration:none; } a:hover{ color:#106b15; background-color:#0a440d; text-decoration:none; } .center{ text-align:center; } a.center{ display:block; margin-left:auto; margin-right:auto; } </style> </head> <body> <!--Cornell, Princeton, Carnegie,Columbia,Stony Brook--> <h1 id="toc" class="toc center">Table of Contents</h1> <a href="#features">Go to:features</a><br> <a href="#ceo">Go to:ceo</a><br> <a href="#hobbies">Go to:hobbies</a><br> <hr> <H1 id="features">THE BEST FEATURES OF THE INTERNET</H1> <a href="#toc">Go to:Table of contents</a><br> <a href="#ceo">Go to:ceo</a><br> <a href="#hobbies">Go to:hobbies</a><br> <UL> <LI>You can meet new people from countries around the world.</LI> <LI> You have access to new media as it becomes public:</LI> <UL> <LI>New Games</LI> <LI>New applications</LI> <UL> <LI>For Business</LI> <LI>For Research</LI> <LI>For FUN</LI> </UL> <LI>Around the Clock News</LI> <LI> Search Engines</LI> <LI>Shopping</LI> <LI>Programming</LI> <UL> <LI>HTML</LI> <LI>Java</LI> <LI>Dynamic HTML</LI> <LI>Scripts</LI> <LI>New languages</LI> </UL> </UL> <LI>Links</LI> <LI>Keeping in touch with old friends</LI> <LI> It is the technology of the future!</LI> </UL> <BR> <H1 id="ceo">3 CEO's</H1> <a href="#toc">Go to:Table of contents</a><br> <a href="#features">Go to:features</a><br> <a href="#hobbies">Go to:hobbies</a><br> <OL class="ur"> <LI>Biz Stone</LI> <LI>Tim Cook</LI> <LI>Michael Dell</LI> </OL> <BR> <h1 id="hobbies"> My Hobbies</h1> <a href="#toc">Go to:Table of contents</a><br> <a href="#features">Go to:features</a><br> <a href="#ceo">Go to:ceo</a><br> <OL class="ur"> <LI>Baking</LI> <LI>Cooking</LI> <LI>Sewing</LI> <LI>Playing piano</LI> <LI>Painting</LI> <LI>Crocheting</LI> <LI>Drawing</LI> <LI>Sketching</LI> <LI> </LI> <LI> </LI> </OL> <a href="#toc">Go to:Top</a><br> </body> </html>

I've tried putting "text-align:center;" in my a style tags but that didn't work. I also tried making "text-align:center;" as it's own style tag and then putting that in the a href as a class and it also did not work. If anyone has the knowledge and would like to share that would be helpful.

Read Entire Article