HTML/CSS/Basic Tags/br
Содержание
"br" adds a new line to the web page
<html>
<head>
<title>br element example</title>
</head>
<body>
<p>Line 1.<br> Line 2<br> Line 3.</p>
<hr>
<br>
<hr>
<hr>
</body>
</html>
Double
with line-height to create a Linebreak
<!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>
<p>
<br /><br class="myStyle" />Linebreak plus 10 pixels.
</p>
</body>
</html>
Hide the
for form layout
<!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="" /><br />
<label for="pword">Password</label>
<input type="text" name="pword" id="pword" value="" /> <br />
<input type="submit" name="Submit" value="Submit" class="buttonSubmit" />
</form>
</body>
</html>
Line breaks
<!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<br/> lover<br /> http://h.co.uk
</address>
</body>
</html>