How to Define an Arial Font in CSS

If you post on your own blog or website, you may want to change certain elements of the format. While there are a lot of programs available to help you build a website, if you just want to do something simple like change the font of your written work from a serif font to the more readable Arial, getting your hands dirty with a little CSS can be the perfect solution.

Instructions

    • 1

      Open the HTML code you would like to edit and look under the section at the top labeled <head> for the code <style type="text/css">. If you are working with a blank page and want to write all the code from scratch, enter in <head> and <style type="text/css">, hitting the "Enter" key after each tag.

    • 2

      Beneath the <style type="text/css"> header, copy and paste the following into a blank line:

      p.sansserif{font-family:Arial}

      If "p.sansserif" is already defined here, simply replace it.

    • 3

      Press the "Enter" key. Type "</style>", "</head>" and "<body>" if you are writing the code for your page from scratch, hitting enter after each tag. Navigate to below the "<body>" tag if you are working with already written html.

    • 4

      Find the text that you would like to change to Arial if you are working with prewritten code.

    • 5

      Type in the following before any text you would like to have in Arial font:

      <p class="sansserif">

    • 6

      Type "</p>" at the end of the text you would like to have in Arial. Press "Enter" and type in "</body>" and "</html>" if you are writing the text from scratch, hitting "Enter" after each.

Tips & Warnings

  • Use quotation marks when working with a font name that is more than one word; for example, font-family: "Times New Roman."

  • Add additional text types when you define your CSS under the <style type="text/css"> header, in case the type you want to have appear isn't supported by your site visitor's web browser, by entering in additional font names in order of most to least preferred, as in the following example:

  • p.sansserif{font-family:Arial,Helvetica,sans-serif;}

  • Whenever editing web code, make sure to save a copy of the original .html file in a text document so you can revert to it if something goes wrong.

Related Searches:

References

Resources

Comments

You May Also Like

  • Fonts to Use for CSS

    Fonts to Use for CSS. CSS, or Cascading Style Sheets, govern the appearance of the text that is on a web page....

  • How to Embed Fonts Using CSS

    When you embed a font in a Web page, you assign the chosen typeface to the content so that it automatically displays...

  • How to Change Fonts in CSS

    Cascading Style Sheets is a language that allows you to style the elements of your web page, such as the text, and...

  • How to Calculate Inches for Arial Font

    For professional purposes, fonts are measured in points, but there are two different kinds of points. Point measurements for traditional print purposes...

  • How to Consolidate CSS Rules

    If you're just learning CSS, you may be a victim of a common CSS newbie mistake--writing essentially the same rule over and...

  • How to Style a Heading with CSS

    First, determine which properties you want to apply to the font. Possible font properties you can style are: * Font-family (for example,...

  • How to Change Font Type Using HTML Code

    Hypertext Markup Language (HTML) is a computer language that is used to create web pages. Websites and web pages are written in...

  • How to Embed TTF Fonts in CSS

    Embedded fonts are nothing new to Web design. Though font-replacement techniques such as Cufon and sIFR came into use around 2008, CSS...

  • How to Define a CSS Class Style

    Comments. You May Also Like. How to Define an Arial Font in CSS. If you post on your own blog or website,...

  • How to Get a Degree Symbol From Arial Font

    All letters and numbers, and many commonly used symbols and punctuation marks, can be accessed through a dedicated keyboard key or by...

  • How to Create a CSS Web Page

    Most websites today use a combination of CSS (Cascading Style Sheets) and HTML (Hypertext Markup Language) or XHTML (Extensible Hypertext Markup Language)....

  • How to Use Nonstandard Fonts in a Website

    Cascading Style Sheets, or CSS, is a tool that allows Website developers or owners to apply styles to any or all elements...

  • Definition of Font Color CSS

    CSS or cascading style sheets are tools Web designers use to create Web pages. CSS is scripting code that can be used...

  • How to Set the Font to Arial in C#

    C#, or C sharp, is a programming language developed by Microsoft. It is an object-oriented programming language that is designed to be...

  • How do I Convert MS Word Symbol Font to Arial?

    The world of word processing and desktop publishing has many different fonts. The Symbol font uses the letters of the Greek alphabet...

  • How to Become an Arial Dancer

    Aerial dancing is incredible and spectacular to watch. It requires a great deal of skill, strength and grace. Aerial dance is still...

  • Neopets CSS Tutorial

    If you have a Neopet, you may wonder how to customize the look of your virtual pet's home page so that you...

Related Ads

Featured