Friday, 20 July 2012

How to Add different colors to visited/unvisited links in css

<!DOCTYPE html> <html> <head> <style type="text/css"> a:link {color:#FF0000;}    /* unvisited link */ a:visited {color:#00FF00;} /* visited link */ a:hover {color:#FF00FF;}   /* mouse over link */ a:active {color:#0000FF;}  /* selected link */ </style> </head> <body> <p><b><a href="http://collegeprojectandtests.blogspot.in/" target="_blank">This...

Friday, 20 July 2012 by Unknown · 0

How to Set the boldness of the font in css

<!DOCTYPE html> <html> <head> <style type="text/css"> p.normal {font-weight:normal;} p.light {font-weight:lighter;} p.thick {font-weight:bold;} p.thicker {font-weight:900;} </style> </head> <body> <p class="normal">paragraph.</p> <p class="light">paragraph.</p> <p class="thick">paragraph.</p> <p class="thicker">paragraph.</p> </bo...

by Unknown · 0

How to Set the variant of the font in css

<!DOCTYPE html> <html> <head> <style type="text/css"> p.normal {font-variant:normal;} p.small {font-variant:small-caps;} </style> </head> <body> <p class="normal">My name is Adolf Hitler.</p> <p class="small">My name is Adolf Hitler.</p> </body> </html>...

by Unknown · 0

How to Set the style of the font in css

<!DOCTYPE html> <html> <head> <style type="text/css"> p.normal {font-style:normal;} p.italic {font-style:italic;} p.oblique {font-style:oblique;} </style> </head> <body> <p class="normal">This is a normal.</p> <p class="italic">This is  italic.</p> <p class="oblique">This is oblique.</p> </body> </html>...

by Unknown · 0

How to Set the size of the font in percent and em using css

<!DOCTYPE html> <html> <head> <style> body {font-size:100%;} h1 {font-size:2.5em;} h2 {font-size:1.875em;} p {font-size:0.875em;} </style> </head> <body> <h1>This is heading 1</h1> <h2>This is heading 2</h2> <p>This is a paragraph.</p> </body> </html> ...

by Unknown · 0

How to Set the size of the font in em using css

<!DOCTYPE html> <html> <head> <style> h1 {font-size:2.5em;} /* 40px/16=2.5em */ h2 {font-size:1.875em;} /* 30px/16=1.875em */ p {font-size:0.875em;} /* 14px/16=0.875em */ </style> </head> <body> <h1>This is heading 1</h1> <h2>This is heading 2</h2> <p>This is a paragraph.</p> <p>Specifying the font-size in em allows all major browsers to resize...

by Unknown · 0

How to Set the size of the font in px in css

<!DOCTYPE html> <html> <head> <style> h1 {font-size:40px;} h2 {font-size:30px;} p {font-size:14px;} </style> </head> <body> <h1>This is 1</h1> <h2>This is 2</h2> <p>This is paragraph.</p> </body> </html> ...

by Unknown · 0

How to Set the size of the font in css

<!DOCTYPE html> <html> <head> <style type="text/css"> h1 {font-size:250%;} h2 {font-size:200%;} p {font-size:100%;} </style> </head> <body> <h1>This is 1</h1> <h2>This is 2</h2> <p>This is paragraph.</p> </body> </html> ...

by Unknown · 0

How to Set the font of a text in css

<!DOCTYPE html> <html> <head> <style type="text/css"> p.serif{font-family:"Times New Roman",Times,serif;} p.sansserif{font-family:Arial,Helvetica,sans-serif;} </style> </head> <body> <h1>CSS font</h1> <p class="serif">This is shown in the Times New Roman font.</p> <p class="sansserif">This is shown in the Arial font.</p> </body> </html...

by Unknown · 0