Cascading style sheet

CSS stands for Cascading Style Sheets. Describes how elements are to be displayed on website. Simply CSS is used to prepare a layout for your web page.

Types of CSS

Inline CSS

Inline CSS is used to manage single element at a time. You can place the Inline CSS in the same line along with your HTML.

Example

<input type=”button” value=”Login” style=”background-color:blue”>

<h2 style=”color:red”>Welcome to CSS World !!! </h2>

<input type=”text”  style=”width:160px; border:solid 1px red”>

Internal CSS

Internal CSS is used to manage multiple elements at a time. This method can be good if you need to style only one page, or if you want different pages to have varying styles.

Example:

<html>

<head>

<style type=”text/css”>

.myclass

{

width:200px;

height:30px;

background-color:gray;

}

</style>

</head>

<body>

Enter Name : <input type=”text” class=”myclass”> <br>

Enter Email : <input type=”text” class=”myclass”>

</body>

</html>

External CSS

This is the same as Internal CSS, the only difference between internal and external css is that you can manage entire website using External CSS while Internal could work on the same page only.

You can link to the file externally by placing one of the following links in the head section of every HTML file.

<link rel=”stylesheet”  type=”text/css” href=“CSS File Path Here” />

Example:

<link rel=”stylesheet”  type=”text/css” href=“CSS File Path Here” />

<link rel=”stylesheet”  type=”text/css” href=“master.css” />

This means, that if you need to modify the design of all your pages, you only need to edit one css file to make global changes to the entire website.

17 thoughts on “Cascading style sheet

  1. Hi this is kind of of off topic but I was wondering if blogs use WYSIWYG editors or if you have to manually code with HTML. I’m starting a blog soon but have no coding know-how so I wanted to get guidance from someone with experience. Any help would be greatly appreciated!|

  2. Today, I went to the beach front with my children. I found a sea shell and gave it to my 4 year old daughter and said “You can hear the ocean if you put this to your ear.” She placed the shell to her ear and screamed. There was a hermit crab inside and it pinched her ear. She never wants to go back! LoL I know this is entirely off topic but I had to tell someone!|

  3. Right here is the right website for everyone who really wants to understand this topic. You realize so much its almost tough to argue with you (not that I actually will need to…HaHa). You definitely put a fresh spin on a topic that has been written about for years. Excellent stuff, just wonderful!|

  4. Its like you read my mind! You seem to know a lot about this, like you wrote the book in it or something. I think that you can do with a few pics to drive the message home a bit, but instead of that, this is wonderful blog. A great read. I will certainly be back.|

  5. Attractive element of content. I simply stumbled upon your website and in accession capital to assert that I acquire in fact loved account your blog posts. Any way I’ll be subscribing in your augment or even I success you get entry to persistently rapidly.|

  6. Thank you for the good writeup. It if truth be told used to be a amusement account it. Glance advanced to more delivered agreeable from you! By the way, how could we keep up a correspondence?|

  7. We’re a gaggle of volunteers and starting a new scheme in our community. Your site offered us with useful info to work on. You have done a formidable task and our entire group can be thankful to you.|

Leave a Reply

Your email address will not be published.

Enjoy the tutorial? Please spread the word :)

Follow by Email
Facebook
Facebook
Google+2k
Google+
http://hirdeshbhardwaj.com/2017/04/09/cascading-style-sheet
YouTube49
YouTube