Saturday, May 18, 2024

CSS tags and their uses

General CSS syntax

selector {property:value} 

Selector{property:value; Another_property:value;............Another_property:value;}

Example

h1{text-align:center; font-color: blue}

_______________________________________________________________________________________________


.red {

            color:red;

}

This tag is used to create a class named red which is indented below <style type="text/css">  inside <title> part of the <head> section of the code.

_______________________________________________________________________________________________

#green {

                  color:green;

}

This tag is used to to cread an id namd green which is indented below <style type="text/css">

inside <title> part of the <head> section of the code.

_______________________________________________________________________________________________

<div id="first section">

</div>

This tag is used to group a part of body section to apply a common css style to it from the corresponding id name.

_______________________________________________________________________________________________

<span style="color:blue">blue</span> eyes.

</p>

A <span> element which is used to color a part of a text.

_____________________________________________________________________


         


No comments:

Post a Comment

HTML Semantics sheet

<article> : Defines independent, self-contained content. <aside>: Contains content that is tangentially related to the content...