HTML Styles


HTML elements can be individually customized by adding
various style properties like font size, colour, background colour, etc


Standard style tags:

  • style - styling HTML elements
  • background-color - background color
  • color - text colors
  • font-family for text fonts
  • font-size - text sizes
  • text-align - text alignment
  • <b> - Bold text
  • <strong> - Important text
  • <i> - Italic text
  • <em> - Emphasized text
  • <mark> - Marked text
  • <small> - Small text
  • <del> - Deleted text
  • <ins> - Inserted text
  • <sub> - Subscript text
  • <sup> - Superscript text


eg

<!DOCTYPE html>
<html>
<body  style="background-color:#e9fbff;">

<h1>Heading Normal</h1>

<h1 style="font-size:30px; color:#ff2432"><u>Custom Style Heading</u></h1>
<p style="color:#aafebb;">paragraph section with color</p>


<p style="color:#b0bd00;">Change text Color</p>
<br>
<p style="font-size:30px">Change text Size</p>
<br>
<p style="font-family:verdana;">Change font family to VERDANA</p>
<br>
<p style="text-align:center;">Change text position to center</p>
<br>

<p><b>Make text bold</b></p>
<br>
<p><u>Make text underlined</u></p>
<br>
<p><i>Make text italics</i></p>
<br>
<p><mark>Marked text</mark></p>
<br>
<p>This is <sub>Subscript  text</sub></p>
<br>
<p>This is <sup>Superscript text</sup></p>
<br>

</body>
</html>


output:




Related Tutorials