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

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 .


Popular posts from this blog

How to Create a WordPress Plugin?

If you want to customise or need to add an extra functionality for your website, you can do this by changing the core of the WordPress, however, if WordPress gets updated your changes will be ineffective. So, to get rid of this problem WordPress introduced modular architecture in which if ones need to extra functionality he can add PHP module called plugins and these plugins are written in PHP . In addition, HTML, JavaScript, JavaQuery and AJAX can also be incorporated to add more functionality , but in this article I will only use an echo command to print a single sentence in  PHP, this plugin will be very simple but at the end you will be able to create your own plugin.
First of all WordPress plugin is a PHP file and this need plugin header in PHP comment which is

/*Plugin Name: Simple Plugin
Plugin URI:
Description: This is demonstration for simple plugin
Version: 0.1.0
Author: Binde…

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- 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-  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…