Answers for "how to limit text length in span"

1

span limit text length

<style>
	.text {
  		display: block;
  		width: 100px;
  		overflow: hidden;
  		white-space: nowrap;
  		text-overflow: ellipsis;
	}
</style>
<span class="text">Hello world this is a long sentence</span>
Posted by: Guest on December-14-2020

Browse Popular Code Answers by Language