How to Change the Size of Anchor Text in HTML


An "anchor" in the HyperText Markup Language (HTML) is a code snippet that links the desired text to another location on the web so that when a visitor clicks on it, she is taken to this new destination. As you build your own HTML pages, you may want to differentiate the size of your links to make these more prominent. Using Cascading Style Sheets (CSS) in conjunction with your HTML "anchor" tag, you can change the size of the anchor text as you prefer.

Things You'll Need

  • HTML text editor
  • Launch your HTML text editor and begin a new page or open an existing one.

  • Locate the "<head></head>" portion of the HTML code at the top of the page and enter a placeholder for the CSS style rule in between these elements. For example:

    <style type="text/css">

  • Create an "a" anchor style, add a "font-size" attribute and type this in between the "<!--" and "-->" comment tags. This style sets the size for any linked text in your document . For instance:

    a { font-size: }

  • Determine the number size that you want your text to be in a common font measurement, such as pixels (px) or percentage (%), and add this to the style rule after the colon. For instance, to make the anchor text 14 pixels, enter this as such:
    a { font-size: 14 px }

  • Save your file and use your text editor's Preview feature to see the new size of the linked text. All links will display this size unless you decide to change the CSS rule.

Related Searches


  • Photo Credit Christopher Robbins/Photodisc/Getty Images
Promoted By Zergnet



You May Also Like

Related Searches

Check It Out

Geek Vs Geek: Robot battles, hoverboard drag race, and more

Is DIY in your DNA? Become part of our maker community.
Submit Your Work!