Skip to main content

How to Include CSS in HTML Document?

CSS stands for Cascading Style Sheets and the language describes HTML tags, furthermore, it eliminates the repetition in making HTML tags stylish. Moreover, it would be better to give examples that can make you better understand.
To include CSS styles tag is used.
Here I will explain using heading tag h2
Heading tag h2
<h2> <span style="color: green;"> This is the first h2  green heading.  </span></h2>
 For the second an third we have to repeat the same
<h2> <span style="color: green;"> This is the second h2  green heading.  </span></h2>
<h2> <span style="color: green;"> This is the third h2  green heading.  </span></h2>
The out of the above three statements would be:

This is the first h2 green heading.

This is the second h2 green heading.

This is the third h2 green heading.

____________________________________________________________________

Using style tag we can write

<style>
h2
{
 color:green;
}
</style>
And only the statements within the tags
<h2> This is the first h2 green heading which uses CSS</h2>
<h2> This is the second h2 green heading which uses CSS</h2>
<h2> This is the third  h2 green heading which uses CSS</h2>
And the output will be:

This is the first h2 green heading that uses CSS.

This is the second h2 green heading that uses CSS.

This is the third h2 green heading that uses CSS.

So, you can see that we do not need to write style="color: green; in every tag so repetition and complexity is eliminated .


Comments

Popular posts from this blog

Social Media and Submission Directories that Can Help to Grow Your Web Traffic

When your blog or website is new it will not be able to get traffic from search engines. Then you need to use social media and submission directories where you will submit your  articles' link. If somebody clicks on the link your article will open and blog will drive traffic. But some submission directories takes long time to approve and some demands reciprocal links which are backlinks from your blog and most of them charge money. Here, I am going to list some social media website and  submission directories which do not take long time to approve.  You can submit your articles link very easily.

1- www.facebook.com- This will be the first  the first  choice of any blogger to submit post link to drive traffic. Further, there are many pages and groups that are running. You can find of your own category and can submit your blog posts.
2- www.medium.com-  This is a very good plateform where you can submit you posts links and even you can write articles. Making account in Medium is ve…

Free Blogging Tools for Beginners

If you start a blog, in the begging you think that  write a post and publish it, this is the only work you need to do. However, this is not the case, you will need several tools to understand traffic patterns and to grow your traffic. In the market, both paid and free tools are available.
But  beginners usualy likes free, because in starting they do not have money to pay. In this article, I am going to list and explain some useful tools  that can help you in blgging.

1- Google Analytics- This tool is used for multipurpose, such as tracking real time users on your website, users behaviours, users by geographical locations,  type of traffics that come, E-commerce transaction tracking and many more. This tool is provided by google can be linked to your website easiliy. Further, Google Analytics provides a tracking code and if you put on your website, your website will be connected to the the Google Analytics.

2- Search Console ( Google Webmaster ) - Search console  is also provided by Goo…

Top Browser's Plugins that Every Blogger Should Know

To know statistics of your blog or website or others, it helps to understand the performance and necessary actions to take. Furthermore, to help you there are many plugins are developed. But, many bloggers do not know that there are bundels of free plugins are that can help you to understand your website. Such as, what runs, alexa rank plugin, moz rank  plugin and many more. Im going to some of the important plugins that every bloggers should install.

1- Alexa Traffic Rank and Alexa Rank Plugin - What  happens when you want to know about  alexa rark of websites you are browsing. You open the url "https://www.alexa.com/siteinfo" and put website name. But these plugins show the alexa rank of browsed websites in the right side of address bar and make your life easy.
Link for Alexa Traffic Rank
2- What Runs - This  plugin is very useful when you want to about technologies a website is running. Such as, server information, server side scipting language, client side scripting langua…