HTML/CSS/Basic Tags/br

Материал из Web эксперт
Перейти к: навигация, поиск

"br" adds a new line to the web page

   <source lang="html4strict">
   

<html> <head> <title>br element example</title> </head> <body>

Line 1.
Line 2
Line 3.


  


</body> </html>


     </source>
   
  


Double
with line-height to create a Linebreak

   <source lang="html4strict">


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"> <head>

   <meta http-equiv="content-type" content="text/html; charset=utf-8" />
   <title></title>

<style type="text/css" media="Screen">

  • .myStyle {
 line-height: 10px;

}

</style> </head> <body>



Linebreak plus 10 pixels.

</body> </html>

</source>
   
  


Hide the
for form layout

   <source lang="html4strict">

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <style type="text/css">

br {

display: none;

} </style> </head> <body>

   <form method="post">
  <label for="uname">Username</label>
  <input type="text" name="uname" id="uname" value="" />
<label for="pword">Password</label> <input type="text" name="pword" id="pword" value="" />
<input type="submit" name="Submit" value="Submit" class="buttonSubmit" /> </form>

</body> </html>

</source>
   
  


Line breaks

   <source lang="html4strict">

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head>

 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <title>Line breaks</title>

</head> <body>

 <address>
 J
lover
http://h.co.uk </address>

</body> </html>

</source>