Search code examples
csshtmlfont-family

Edwardian Script to Text In HTML5


I have to display the text with font family as Edwardian Script.

How to do that?

This is my html:

<div class="sweetest_ride">Sweetest Rides Available Worldwide</div> 

This is css:

.sweetest_ride {
    color: #FFFFFF;
    float: left;
    font-family: "Edwardian Script";
    font-size: 30px;
    font-weight: bold;
    letter-spacing: 2px;
    margin-top: 10px;
    padding-bottom: 10px;
    text-align: center;
    width: 100%;
}

When i using this nothing wiil happen.

The Edwardian Script font family is displayed in this link:

www.microsoft.com/typography/fonts/font.aspx?FMID=990


Solution

  • You could create a @font-face rule in CSS:

    @font-face {
        font-family: "Edwardian Script";
        src: url(path/to/the/font);
    }
    

    and then use it with:

    font-family: "Edwardian Script";
    

    See the supplied link for more information on parameters that can be set.