It depends on what your rule for italic headings is. Which headings should be italic?
If it’s headings on a specific set of pages, then the accepted way to do that would be to put a class on the body tag of those pages:
<body class="italic-headings-page">
Then style those headings via CSS:
body.italic-headings-page h5 {
font-style: italic;
}
On the other hand, if the site is being edited by non-technical editors, and they want to be able to make arbitrary headings italic, and they can’t give headings classes in their CMS, then I’d go for <i>
:
<h5><i>Heading text in italic</i></h5>
When the intention is purely presentational, you might as well express that intention, and <i>
does it better than <em>
.
Without knowing what your rule is for which headings are italic, it’s impossible to know what the best way is to implement that rule in HTML and CSS.