HTML, Forms, CSS
HTML, Forms, CSS
CSS
Inline Linking
<BODY Style=background-color:blue>
<P Style=Color:red;size:5>
Internal Linking:-
<html>
<head><title> </title>
<style TYPE="text/css">
body {background-color:green} </style></head>
External Linking
Syntax:- <LINK rel=”stylesheet” href=css.css type=text/css> (in the html file)
H1{color:red}
FONT
Family:
P{Font-Family:Arial, Verdana, Sans-Serif;}
<P Style=”Font-family:arial, verdana, sans-serif;”>
Style:
P{Font-style:oblique}
<P Style=”Font-style:oblique;”>
Size:
Can be absolute, relative size, length or percentage
Absolute size=xx-small, x-small, small, medium, large, x-large, xx-large
Relative Strength=larger, smaller
Specifying font size-> px, pt, %, em
By default, font size is 16 pixels.
H1{Font-size:large}
<P Style=”Font Size:50px;”>
Align
H1{Text-align:center/right/left/justify:}
Color
H1{Color:#hexvalue/colorname/rgb color code;}
Height
H1{Line=Height:5px;}
Background-color
P{Background-color:Transparent/Color/Hex value/rgb}
Margin
Margin-Top, Margin-right, Margin-bottom, margin-left
Length= specifies the margin in units of length, px, pt, cm
Percentage= Specifies the margin in % of the width
Auto=Margin is calculated by browser automatically
P{Margin-top:100px; Margin-bottom:100px;Margin-left:150px;Margin-right:150px;}
Border-Style
Border-style:value;
Value: None/Hidden/Dotted/Dashed/Solid/Double/Groove/Ridge/Inset/Outset
Height and Width Property
-Sets the height and width of a web page element
- Height can either be set to auto
- Can be defined in px,cm,%,etc.
P{Width:100px;Height;100px}
Float
Used to push the position of an element left or right in relation to the other elements to wrap around it.
Values= left, right, none, inherit
Outline
Outline Style, Outline width, outline color,
inherit, initial.
Outline width values- thin, thick, medium,
length, inherit