question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

<em> is italicizing for some reason with this code

See original GitHub issue

Challenge Change Text Inside an Element Using jQuery has an issue. User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36. Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:


<script>
  $(document).ready(function() {
    $("#target1").css("color", "red");
    $("#target4").html("<em> #target4 </em>");
  });
</script>

<!-- Only change code above this line. -->

<div class="container-fluid">
  <h3 class="text-primary text-center">jQuery Playground</h3>
  <div class="row">
    <div class="col-xs-6">
      <h4>#left-well</h4>
      <div class="well" id="left-well">
        <button class="btn btn-default target" id="target1">#target1</button>
        <button class="btn btn-default target" id="target2">#target2</button>
        <button class="btn btn-default target" id="target3">#target3</button>
      </div>
    </div>
    <div class="col-xs-6">
      <h4>#right-well</h4>
      <div class="well" id="right-well">
        <button class="btn btn-default target" id="target4">#target4</button>
        <button class="btn btn-default target" id="target5">#target5</button>
        <button class="btn btn-default target" id="target6">#target6</button>
      </div>
    </div>
  </div>
</div>

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ajain17commented, Feb 1, 2017

Update: I got busy with other 2 PRs. will work on this today.

1reaction
ajain17commented, Jan 27, 2017

ok. I will work on this

Read more comments on GitHub >

github_iconTop Results From Across the Web

<em>: The Emphasis element - HTML - MDN Web Docs
Use the <i> element to mark text that is in an alternate tone or mood, which covers many common situations for italics such...
Read more >
How to Bold, Italicize & Format Text in HTML - HubSpot Blog
To italicize the text in HTML, use either the em tag or the i (italics) tag. Both of these tags will italicize the...
Read more >
How to Italicize Text - CSS-Tricks
Use the <em> tag. The “em” in <em> literally stands for emphasis. Browsers will, by default, make italicize text that is wrapped in...
Read more >
HTML Italics Tutorial – How to Make Text Italic with the <i> tag
This text is displayed in italics. Let's look at a few reasons why you might want to use the <i> tag. Using the...
Read more >
You're using〈em〉wrong - LogRocket Blog
There are some other combinations of tags that would cause italicised text inside an italicised scope, but most of them are <em> inside...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found