CSS Borders:
- We can set CSS borders to all elements or individual elements.
- We can apply borders to elements ID selector, Class selector…..
<!doctype html> <html> <head> <style> p.one{ color : red ; text-align : center ; border-color : blue ; border-style : solid ; } p.two{ color : blue ; text-align : center ; border-color : green ; border-style : dotted ; } p.three{ color : green ; text-align : center ; border-color : red ; border-style : dashed ; } </style> </head> <body> <p class=”one”> Paragraph1 </p> <p class=”two”> Paragraph2 </p> <p class=”three”> Paragraph3 </p> <p class=”four”> Paragraph4 </p> </body> </html> |