# Formatting htmlText

**URL:** <https://forum.kirupa.com/t/formatting-htmltext/328240>\
**Category:** flash\
**Created:** [April 30, 2012, 2:56pm UTC](https://forum.kirupa.com/t/formatting-htmltext/328240 "2012-04-30T14:56:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt7](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@Matt7](https://forum.kirupa.com/u/Matt7)\
**Post date:** [April 30, 2012, 2:56pm UTC](https://forum.kirupa.com/t/formatting-htmltext/328240/1 "2012-04-30T14:56:46Z")

</div>

I’m working with last.fm’s api to return a biography for an artist… which I have working and displaying on the stage in a textfield.

However I am having trouble formatting the text. I want to be able to do a little css on it basically (manipulate the fonts, size, etc.) but it doesn’t work the way I am approaching it.

I thought maybe this could be to do with the fact it’s ‘htmlText’?

```auto
		public function doArtistDataReady(evt:LFMArtistInfoEvent):void {
			var bio:String = evt.artistInfo.bio.summary;
			
					//var bioField:TextField = new TextField();
					
					var bioFormat : TextFormat = new TextFormat("Verdana", 20, 0x0000FF, true, true, false, null, null, TextFormatAlign.LEFT, 10, 10, 0, null);
					bioField.setTextFormat(bioFormat);
					
					bioField.width = 350;
					bioField.height = 300;
					bioField.x = 830;
					bioField.y = 20;
					bioField.background = true;
					bioField.backgroundColor = 0xFFFFFF;
					bioField.border = true;
					bioField.borderColor = 0xFFFFFF;
					bioField.multiline = true; 
           			bioField.wordWrap = true; 
					bioField.alpha = .5;
					addChild(bioField);	
					
					bioField.htmlText = "Biography:" + bio;
			
					trace("bio:" + bio);
					
					bioField.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownScroll);
		}

```

Please can somebody point me in the right direction this is driving me carrrazzy.
