HTML STYLES
Html styles are used to style HTML elements it also means changing default values.
Syntax:<! DOCTYPE html> <html> <head> <title> style=background color </title> </head> <body style="background-color:yellow"> <p> Hello World </p> <body> <html> |
Hello World |
<! DOCTYPE html> <html> <head> <title> style=text color </title> </head> <body> <p style="color:red"> My color is Red </p> <p style="color:green"> My color is green </p> <p style="color:blue"> My color is blue </p> <p style="color:yellow"> My color is yellow </p> <body> <html> |
<! DOCTYPE html> <html> <head> <title> style=text font family </title> </head> <body> <p style="font-family:courier"> I am a caurier </p> <body> <html> |
<! DOCTYPE html> <html> <head> <title> style=font sizing </title> </head> <body> <p style="font-sizing:20px"> My size is 20 px </p> <p style="font-sizing:50px"> My size is 50 px </p> <body> <html> |
<! DOCTYPE html> <html> <head> <title> style= "text-alignment" </title> </head> <body> <p style="text-align:left"> left </p> <p style="text-align:center"> center </p> <p style="text-align:right"> right </p> <body> <html> |