Q:

Change hyperlink style

I'm trying to change a word in a hyperlink text.
Let's say the hyperlink is "foofoofoo". How to change the middle foo to italics?
I've tried this:
<a href="#">
foo<div style="font-style: italic;">foo<div>foo
</a>

However, my IDE states underlines the div as error and the whole hyperlink style gets messed up. 
Am I doing it wrong?
Thank you for the help!

A:

Wrap the middle foo in the italic  tag instead of a division.
foo<i>foo</i>foo

