60
Views
1
Comments
Javasript: InnerHtml cannot read tag <em> on mobile</em>
Question

Hi guys, i have an issue


I have HTML like this: 

"<p><em><strong>Welcome</strong></em></p>"

i use java script inner html: 

var Test1= document.getElementById($parameters.Id);
   Test1.innerHTML = $parameters.Content;

but when i see the result on  mobile, Welcome text only bold.

any idea?

If I try on Web, the result bold and italic

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Jonatan,

"strong" and "em" are tags that typically cause the font-weight to increase and the font-style to be set to "italic", respectively, but this is browser dependent, and can be controlled by CSS.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.