HTML/CSS/Basic Tags/hr
Содержание
Horizontal rule
<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>Horizontal rule</title>
</head> <body>
Customer feedback
Our loyal customers.
Reviews
</body> </html>
</source>
Horizontal Rule Example
<source lang="html4strict">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <TITLE>Horizontal Rule Example</TITLE> </HEAD> <BODY>
HR with size of 10
HR with width of 50% and no shading
Width of 200 pixels, size of 3 pixels, and no shade
Width of 100, aligned right
Width of 100, aligned left
Width of 100, aligned center
</BODY> </HTML>
</source>
Horizontal Rule with image
<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">
- .hr {
height: 40px; width: 200px; margin: 0 auto 0 auto; border: 0; background: url("http://www.wbex.ru/style/logo.png") repeat-x left center; line-height: 1px; font-size: 1px;
}
- .hr hr {
display: none;
} </style> </head> <body>
</body> </html>
</source>
"hr" creates a horizontal rule
<source lang="html4strict">
<html> <head> <title>hr element example</title> </head> <body>Text
Text
www.wbex.ru
</body> </html>
</source>
Set background color for
<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"> hr {
width: 10px; height: 10px; background-color: #777;
} </style> </head> <body>
This is a text
</body>
</html>
</source>
Set line width, size and shade together
<source lang="html4strict">
<html> <body>
</body> </html>
</source>
Set width and height for
<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"> hr {
width: 10px; height: 10px; background-color: #777;
} </style> </head> <body>
This is a text
</body>
</html>
</source>
The hr tag defines a horizontal rule
<source lang="html4strict">
<html> <body> <html> <body>
The hr tag defines a horizontal rule:
This is a paragraph
This is a paragraph
This is a paragraph
</body> </html> </body> </html>
</source>