Introduction to CSS
Hello there guys, i just wanted to show you how to apply CSS in your web-pages..What is a CSS?
CSS are meant to be created to style the <html>, even though you can style the <html> without CSS using inline style, but the main purpose of HTML is to set the structure of the web page, not the styling.
How to apply CSS in your web page..?
1. Inline style (as already mention above):
Here's an example, you can try:
<body>
<p style="text-align:center;color:red"> This is inline Style </p>
</body>
2. Internal style
<head>
<style>
p {color:red}
h1 {text-align:center}
</style>
</head>
3. Eksternal Style
<head>
<link rel="stylesheet" type="text/css" href="example.css">
</head>
Note : "Example.CSS" is the CSS file you wish to add in the HTML"
You might ask ? What style should i use ?
Well, it depends on your need actually, if your trying to develop a larger scale on web, you might consider using the eksternal CSS style because it gives you the flexibility to change styles in your web without editing anything in your HTML.
If your just want to play a small project on web, internal and inline style is your choice :)
If your just want to play a small project on web, internal and inline style is your choice :)
Well then,
Happy Developing Web.
Comments
Post a Comment