Style Tags Used in HTML

The Style Tags in HTML is used to give specific format to the HTML page.

Style Tags Used in HTML

Style Tags Used in HTML

     

The Style Tags in HTML is used to give specific format to the HTML page. The lists of Style Tags used in HTML page are as follow -

 

 

 

 

 

 

 

    Tags    Description
   <Style>   This is used to define style  in HTML document.
   <link>   This is used to give  reference of the resource.
   <div>    This is used to give the section in a document
   <span >   This is used to modify the characteristics of a small section of text

 

The <style> tag is used in the <head> to format a HTML document. The document will be formatted according to the styles defined in the style tag.

 

<html>

<head>
<style type="text/css">
h1 {color:red}
h3 {color:blue}
</style>
</head>

<body>
<h1>This is header 1. Color of this text is red.</h1>
</h3>This is header 3. Color of this text is blue.</h3>
</body>

</html>

 

 

The <link> tag is used in the header to link to an external style sheet as we explained in the previous example.

Download