HTML/CSS/Style Basics/rgb
Содержание
background-color: rgb( 128)
<source lang="html4strict">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html>
<head> <title> inch measurement </title> <style type="text/css" media="all"> body { background-color: rgb(128, 128, 128); } </style> </head> <body> </body>
</html>
</source>
background-color: rgb(50%, 50%, 50%)
<source lang="html4strict">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html>
<head> <title> inch measurement </title> <style type="text/css" media="all"> body { background-color: rgb(50%, 50%, 50%); } </style> </head> <body> </body>
</html>
</source>
border: thin solid rgb(
<source lang="html4strict">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html>
<head> <title> exercise 4-2 </title> <style type="text/css" media="all"> body { font-size: 12px; } h1 { font-size: 25px; background: rgb(255, 192, 203); padding: 25px; border: thin solid rgb(0, 0, 0); } p { font-size: 11px; padding: 11px; border: thin solid rgb(0, 0, 0); background: rgb(128, 128, 128); color: rgb(255, 255, 255); } </style> </head> <body>
This is a heading
This is a paragraph of text.
</body>
</html>
</source>
rgb color
<source lang="html4strict">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html>
<head> <title> inch measurement </title> <style type="text/css" media="all"> body { background-color: rgb(128, 128, 128); } </style> </head> <body> </body>
</html>
</source>
rgb color with percentage
<source lang="html4strict">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html>
<head> <title> inch measurement </title> <style type="text/css" media="all"> body { background-color: rgb(50%, 50%, 50%); } </style> </head> <body> </body>
</html>
</source>
Use rgb function to set the color
<source lang="html4strict">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>Chapter Five</title> <style type="text/css"> body {
margin: 20px; color: black;
} h1 {
color: #663366;
} h2 {
color: #c9c;
} ul {
color: rgb(051, 051, 102);
} hr {
color: rgb(0%, 50%, 100%);
} </style> </head> <body>
color my world
gender and color
following:
- B
- M
- M
- W
this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test.
</body> </html>
</source>