Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tut] xHTML CSS (xHTML Advanced)
10-20-2014, 10:19 PM, (This post was last modified: 10-21-2014, 12:12 AM by craigibhoy.)
Post: #1
[Tut] xHTML CSS (xHTML Advanced)
External Style Sheet
<link rel="stylesheet" type="text/css" href="mystyle.css" />
An external style sheet is ideal when the style is applied to many pages. With an external style sheet, you can change the
look of an entire wap site by changing one file. Each page must link to the style sheet
using the <link> tag.

The <link>
tag goes inside the <head> section

Internal Style Sheet
<style type="text/css">
body {background-color:yellow;}
p {color:blue;}
An internal style sheet can be used if one single document
has a unique style. Internal styles are defined in the <head> section of an HTML
page, by using the <style> tag!

Inline Styles
<p style="color: blue; margin-left: 20px; ">This is a paragraph.</p>
An inline style can be used if a unique style is to be applied to one single occurrence of an element. To use inline styles,
use the style tag in the relevant element. The style tag can contain any CSS property. The example up shows how to change the text color and the left margin of a paragraph.


Forum Jump:

Users browsing this thread: 1 Guest(s)