Take this code for example
.test {
width: 50%;
height: 50%;
}
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1 class="test">This is a Headindfdfdfdfdsdfsdffdfdfdfddfdfdfddfghfghfddfdfdfdfdfdfdfdfdfdffdffdfdffdg</h1>
</body>
</html>
I restrict the width of the heading to be half of the whole page, and I wish the text could automatically line breaking once it reaches out of the margin. But it doesn't work.
So, how to automatically (not using </br>
) line breaking a heading ?