Skip to main content

Style tag

Style | HTML: Style tag used to modify the properties with their related values.

Syntax:                      <tagname style ="property:value;"> </tagname>

List of Modifications with Style:

  1. Font Family, Font Size and color
  2. Text align
  3. Background color
  and
  4. Horizontal line


Here is the Style.html:

  1.   <!DOCTYPE html>
  2.   <html>
  3.     <head>
  4.       <title>style tag in Html</title>
  5.     </head>
  6.     <body style = "background-color:green;">
  7.       <hr>
  8.       <h1>Font Family, Font Size and Color</h1>
  9.       <h1 style = "font-family:cambria;"> Font Fomily in Html</h1>
  10.       <h1 style = "font-size:50px;"> Font Size in Html</h1>
  11.       <h1 style = "color:#FF0000;"> Color in Html</h1>
  12.       <hr>
  13.       <h1>Text align </h1>
  14.       <h1 style = "Text-align:center;">Text align in Html</h1>
  15.       <hr>
  16.     </body>
  17.   </html>

Web view of Html:



Here is the Video: