# Style.setStyle("h1"

**URL:** <https://forum.kirupa.com/t/style-setstyle-h1/306062>\
**Category:** Uncategorized\
**Created:** [March 9, 2010, 2:51am UTC](https://forum.kirupa.com/t/style-setstyle-h1/306062 "2010-03-09T02:51:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aa72](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@aa72](https://forum.kirupa.com/u/aa72)\
**Post date:** [March 9, 2010, 2:51am UTC](https://forum.kirupa.com/t/style-setstyle-h1/306062/1 "2010-03-09T02:51:05Z")

</div>

Hi,

I am setting styles for “a” and “h1” linked to an external file. The “a” and “a:hover” shows, but the h1 appears plain with no style. What am I doing wrong?? In the external file, I simply have :

```auto
<h1>H1 Title </h1>

```

and here is my AS code:

```auto
var textLoader:URLLoader = new URLLoader();
var textReq:URLRequest = new URLRequest("external.txt");
var style:StyleSheet = new StyleSheet();
style.setStyle("h1", {fontSize:'25',color:'#000000'});
style.setStyle("a", {color: "#CC0000",fontStyle: "italic"});
style.setStyle("a:hover", {color:'#0000FF',textDecoration:'underline'});

function textLoaded(event:Event):void{
    external_txt.htmlText = textLoader.data;
    external_txt.styleSheet = style;
}

textLoader.load(textReq);
textLoader.addEventListener(Event.COMPLETE, textLoaded);

```

Many many thanks!!
