Posts

Showing posts with the label CSS

DHTML Unit 1 programs

!..........DHTML Unit-1(CSS) program............! NOTE: ALL THE PROGRAMS DONE BY SHAKSHI SHAH.........! 1) Write HTML program which contains cascaded style sheet for p, h2, h3, body and font attribute. ANS) <!DOCTYPE html> <html> <head> <title>UNIT 1 - prg 1</title> <style> p { background-color:yellow; } h2 { color:red; //this will change font color to red... } h3 { font-size:45%;   //to change font size } </style> </head> <body> <p>This is p tag</p> <h2>This is h2 tag</h2> <h3>This is h3 tag</h3> </body> </html> 2)Write HTML program which contains external style sheet with user-defined Classes. ANS) HTML CODING : <!doctype html> <html> <head> <title>Unit 1 - prg 2</title> <link rel="stylesheet" href="css1.css" type="text/css"> </head> <body> <p c...

Border using CSS in html file

BORDER AND BACKGROUND USING EXTERNEL CSS FILE IN HTML. There are 4 property of border : 1.border-width: (give width in px) for example : border-width:5px; 2.border-style:(required) (there are too many value for border-style property) solid dotted dashed double inset outset 3.border-color: give color name  (red)  or HEX value ( #fff) or rgb ( , , ) values for color. We use shorthand property to give border to any object. border: width   style   color ; Background have mainly 4 value : 1.background-color : give color name  (red)  or HEX value ( #fff) or rgb ( , , ) values. or hsl( , , ) values. 2.background-image : background-image:url("");    /* type name or path in breckets */ 3.background-attchment:  background-attchment:fixed; 4.background-repeat : values: repeat x ----for repeat only horizontally repeat y ----for repeat only vertically repeat ------to repeat on both vertically and h...