Google Font in Asp.net

Description:-

In this article we will see how to use google font in our webpage. here i have given sample demo example to see how can we use through google api.

Default.aspx:-

<head runat="server">
<title>Code Scratcher</title>
<link href="http://fonts.googleapis.com/css?family=Open+Sans"type="text/css"rel="stylesheet"/>
<link href="http://fonts.googleapis.com/css?family=Droid+Sans"type="text/css"rel="stylesheet"/>
<style type="text/css">
.font1
{
  font-family: 'Open Sans';
  text-align: justify;
  font-weight: 400;
}
.font2
{
  font-family: 'Droid Sans';
  text-align: justify;
  font-weight: 700;
}
</style>
</head>
<body>
<form id="form1"runat="server">
<div>
<p class="font1">
  <span>Google font : Open Sans </span>
<br/>
    oremipsum dolor sit amet, consectetueradipiscingelit. Aeneancommodo ligula eget dolor. Aeneanmassa. Cum sociisnatoquepenatibusetmagnis dis parturient montes, nasceturridiculus mus. Donec quam felis, ultriciesnec, pellentesqueeu, pretium quis, sem. Nullaconsequatmassaquisenim. Donecpedejusto, fringillavel, aliquet nec, vulputateeget, arcu. In enimjusto, rhoncusut, imperdiet a, venenatis vitae, justo. Nullam dictum eliseupedemollispretium.Integer tincidunt.Crasdapibus. Vivamuselementum semper nisi.Aeneanvulputateeleifendtellus.Aeneanleo ligula, porttitoreu, consequat vitae, eleifend ac, enim. Aliquamlorem ante, dapibus in, viverraquis, feugiat a, tellus. Phasellusviverranullautmetusvariuslaoreet. Quisquerutrum.Aeneanimperdiet.Etiamultricies nisi velaugue.Curabiturullamcorper ultricies nisi. Nam eget dui.Etiamrhoncus. Maecenas tempus, tellusegetcondimentum rhoncus, sem quam semper libero, sit ametadipiscingsemnequesedipsum. Nam quam nunc, blanditvel, luctuspulvinar, hendrerit id, lorem. Maecenas necodio et ante tincidunt tempus. Donec vitae sapienutliberovenenatisfaucibus.Nullamquis ante. Etiam sit ametorciegeterosfaucibustincidunt. Duisleo. Sedfringillamauris sitametnibh. Donecsodalessagittis magna.Sedconsequat, leoegetbibendumsodales, auguevelitcursusnunc,
</p>
<p class="font2">
<span>Google font : Droid Sans </span>
<br/>
    A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart. I am alone, and feel the charm of existence in this spot, which was created for the bliss of souls like mine. I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that
    I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now. When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream; and, as I lie close to the earth, a thousand unknown plants are noticed by me: when I hear the buzz of the little world among the stalks, and grow familiar with the countless indescribable forms of the insects and flies, then I feel the presence of the Almighty, who formed us in his own image, and the breath.
</p>
</div>
</form>
</body>
</html>

Related Posts

Previous
Next Post »

Thanks for comments.....