How to Control XML Fonts

How to Control XML Fonts thumbnail
The fontprops.XML location replaces http://www in your browser

The simplest way to control XML (eXtensible Markup Language) fonts is to use a style sheet. These style sheets allow you to control the properties of a font, such as size, weight and color. Each font property is defined in a style sheet that links to your XML file. For every tag in your XML file, the font properties let you define how the font appears on the browser page. You can change the size of a font from small to large, the weight from normal to bold, and the color from black to blue simply by assigning values to each font property.

Instructions

    • 1

      Launch an HTML (Hyper Text Markup Language) editor such as Notepad.

    • 2

      Type the code below.
      <?xml version="1.0"?>
      <?xml-stylesheet type="text/css" href="fontprops.css"?>
      <BIGFONT>
      This is a larger font size of 48 points
      <BOLDFONT>
      This is a bold font
      </BOLDFONT>
      <COLORFONT>
      This font is the color blue
      </COLORFONT>
      </BIGFONT>

    • 3

      Click "File," "Save" and type "fontprops.xml" in the "Save as type" section.

    • 4

      Click the "Save" button to save this XML file containing the fonts controlled by style sheets.

    • 5

      Click "File," "New" and type in the following.
      BIGFONT {font-size: 48pt; display: block}
      BOLDFONT {font-weight: bold}
      COLORFONT {color: blue}
      This assigns the values to the font properties.

    • 6

      Click "File," "Save" and type "fontprops.css" in the "Save as type" section.

    • 7

      Click the "Save" button to save this CSS (Cascading Style Sheet) file in the same directory as the XML file. This file controls the XML fonts using font properties.

    • 8

      Open "fontprops.xml," with your Internet browser. Each XML tag and its control will be displayed. The large font size is 48 points, the bold font is bold and the blue font is displayed in the color blue. Each XML font is controlled by the font property values specified in the style sheet.

Related Searches:

References

Resources

Comments

You May Also Like

  • How to Change the Font Size With XML

    To change the font size with XML (eXtensible Markup Language), use Cascading Style Sheets (CSS). The style sheet can be named anything...

  • How to Link Font Files

    If your website provides a particular service--for example, free font files--it is absolutely vital that your users can easily and straightforwardly download...

  • 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 Change Font Size in HTML

    Before HTML 4.0, properties of font such as size could be manipulated through the "font" tag. This tag is now gone. The...

  • Microsoft Word XML Tutorial

    Microsoft Word produces XML that can be used in other documents or even on the web. The XML contained in a Word...

  • How to Use Fonts on Wordpress

    If you have a Wordpress website or blog and would like to alter the fonts being used in some way, it is...

  • How do I Change Font Size on the Fly With Style Sheets?

    Web developers change font properties of website text by modifying the text object's Style Sheet values when viewers perform an action on...

  • How to Change XML Encoding

    Extensible Markup Language (XML) has become the most popular language for data representation, especially for electronic documents available on the Internet. Even...

Related Ads

Featured