Answers for "set line break height css"

CSS
1

break line height css

<!DOCTYPE html >
<html>
  
<head>
    <title>
      Customized break example
  </title>
  
    <style type="text/css">
        .br {
            display: block;
            margin-bottom: 0em;
        }
          
        .brmedium {
            display: block;
            margin-bottom: 1em;
        }
          
        .brlarge {
            display: block;
            margin-bottom: 2em;
        }
    </style>
</head>
  
<body>
  
    <h3>This page shows different 
      break height between lines</h3>
    <p> Hi User
      <span class="brlarge"></span>
      Welcome to
      <span class="brmedium"></span> 
      Geeks for geeks.
      <span class="br"></span> 
      Hope you have enjoyed your stay.
    </p>
    
</body>
  
</html>
Posted by: Guest on December-28-2021
1

change br line height

You can't change the height of the br tag itself, as it's not an element that takes up space in the page. It's just an instruction to create a new line.

You can change the line height using the line-height style. That will change the distance between the text blocks that you have separated by empty lines, but natually also the distance between lines in a text block.

For completeness: Text blocks in HTML is usually done using the p tag around text blocks. That way you can control the line height inside the p tag, and also the spacing between the p tags.
Posted by: Guest on March-31-2021

Browse Popular Code Answers by Language