HTML CSS is the topic that we are going to discuss in this post. CSS stands for Cascade Style Sheet, its work is to make web page display attractive and effective. It decreases the word effort that has to be put in html, to a single web source.

It can be used in three ways:

  • Inline CSS : This can be used with the help of style attribute in elements.
  • Internal CSS : It can be used by using a <style> element under the <head> section.
  • External CSS : it can be used by making an external file and later integrate with the hyper text markup language file. The advantage of this property is that you can change the entire property values from different file.

How To Use CSS in HTML?

Inline CSS : This is used when we need to provide unique display to single HTML element. We can do this by using style attribute of the element. It is generally used as name suggests in line element under <body> tag. Let’s have an example of it:

HMTL CSS inline

Internal Cascade Style Sheet in HTML: It is basically used to define the style of a HTML page. It used undet the <head> section of the page. Let’s have the example of it:

HTML CSS:  Internal CSS

External Cascade style sheet: In this case, an external file, related to pages are executed and then linked to the main file with the help of a link. 

external css


With the help of cascade style sheet we can change the font color, font family and font size also. Look at the example below:



Border, Padding, and Margin: We can also add borders, padding, and margins to our documents so as to make our sober coding page more attracting and effective. Look at the example below:

border, padding, and margin

We use various tags in our coding, for reference to use various tags, click here.

Categories: HTML tutorials


Leave a Reply

Your email address will not be published. Required fields are marked *