Set the overflowed content for the <p> element to have ellipsis (...) - HTML CSS CSS

HTML CSS examples for CSS:Quiz

Description

Set the overflowed content for the <p> element to have ellipsis (...)

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<head>
<style>
p {<!--  ww  w .  j  av a  2s  . c o  m-->
    white-space: nowrap;
    width: 200px;
    border: 1px solid #000000;
    overflow: hidden;
    text-overflow: ellipsis;
}
</style>
</head>
<body>

<p>This paragraph contains a very long word: supercalifragilisticexpialidocious.</p>

</body>
</html>

Related Tutorials