Website can not be completed without any style. So you apply CSS. When a browser reads a CSS style sheet, this formats the HTML document according to the information in the CSS style sheet.
With 3 basic ways you can add CSS in your web pages:-
<link href="style.css" rel="stylesheet" type="text/css">
or import CSS:
<style type="text/css" media="all"> @import "../style.css"; </style>
Read Also: Align text vertically next to an image
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Sample page</title> <style type="text/css"> div { padding-top: 10px; } </style> </head> <body> </body> </html>
<div style="padding-top:10px;">Your content goes here...</div>
In a world where digital presence is paramount, the question isn't whether you should do…
Over the years, people have experimented with various methods to maintain healthy and beautiful hair.…
Your brand more than developing an attractive and creative logo and infectious motto. It's the…
Introduction Are you someone who has suffered from a personal injury and want to file…
Operating from home has emerged as one of the most popular ways of doing jobs…
If the consequences of our society’s ever-growing debt are what worries you, then it is…
View Comments
Thanks, this is very useful, basically the import.
I am new to CSS. Keep posting others.