I am trying to highlight a line and the highlight is going on to the end of the line. I would like the highlight to stop right after the last word.

This is my code

<html>
  <title>Types of Netowrks</title>
  <body style="background-color: lightgreen;">
    <h1 style="background-color: yellow;">Types of Network</h1>
    
    <p style="color: black; background-color: yellow;">	A personal area network (PAN) is a <span style="color: blue;">computer network</span> for 
    interconnecting ⦁	<span style="color: blue;">electronic devices</span> centered on an individual person's workspace.
    A PAN provides <span style="color: blue;">data transmission</span> among devices such as <span style="color: blue;">	computers, smartphones, tablets and personal digital 
    assistants.</span> PANs can be used for communication among the personal devices themselves, or for connecting to 
    a higher level network and the Internet where one master device takes up the role as <span style="color: blue;"	>gateway</span></p>
  </body>
</html>

And this is my output

r/web_design - How to break highlight with the last word of a sentence?

And this is what I want it to be

r/web_design - How to break highlight with the last word of a sentence?



Source link

Write A Comment