Skip to main content

Advantages of using CSS

 

o Time Saver- Writing CSS code saves our time as we can do global changes easily .

o Page loads faster- We are not considered to write HTML tag attributes every time, if we are using CSS. So, less code means our page will load faster.

o Superior styles to HTML- Array of attributes in CSS are wider than HTML, that gives a better look to the page.

 oMaintenance becomes easy- If you want to make a change globally, just change the style and changes will be done in all the web pages.

o Multiple device permittance- CSS allow content to be optimize for various types of devices. It make the pages compatible to different devices and browsers.

 

o How we write code in CSS/Use-

External Style Sheet-   is used when we want to apply style to multiple pages. Each of the pages must link to style sheet by using <link> tag.

Internal Style Sheet- It should be used when we want to style single document. They are defined in head section.

Inline Style Sheet- means style sheets inside the HTML element. It has the highest priority, means it overrides the style attribute written inside the <head> tag.

CSS syntax- is divided into 3 parts i.e. selector, property and value. Selector is basically the HTML element/tag that we want to style and property is the attribute that we want to change.

And the property is given value. The property and value are surrounded by curly braces and separated by a colon (:).

      selector {property:value}

            body {color:yellow}

            h1 {font-family: “Arial”}

 

Different types of selectors-

 

The type selector-

 

h1{

        color #36CFFF;

}

The universal selector

*{

       color #000000;

}

The class selector

.black {

        color #000000;

}

The ID selector

#black {

          color #000000;

}

The child selector

body>p {

    color #000000;

}

The attribute selector

Input[type= “text”]{

    color #000000;

}

 

CSS links- Links can be styled using CSS. Here we have four different link stages -

Ø Link (unvisited )

Ø Visited

Ø Hover

Ø Active ( on which text user is clicking)

Above stages must come in this order as shown above.

<style type= “text/css”>

      a:link{color:blue}

      a:visited{color:green}

      a:hover{color:puple}

      a:active{color:red}

</style>

Comments

Popular posts from this blog

Cascading Style Sheet

  CSS ( The Stylist ) HTML is responsible for all the core foundation and CSS is responsible designing of webpage like pretty layout, add colors to your font, change the font-size and font-style etc. Both are used together.               Hence we can say that- “It is a language for specifying how documents/web-pages are presented to the user.” By the use of CSS, we can manage what the color of text, style of fonts, background color and images, spaces between the paragraphs, variation in display for different devices and screen size should be, how columns are sized etc. It gives us the control over presentation of the document.   History and versions- It was invented by HakonWium Lie in 1994 and maintained by a group of people within the W3C (World Wide Web Consortium). This group creates docs. called ‘specifications’. After a discussion by W3C members, it becomes a ‘recommendation’. In December 1996, C...

JAVASCRIPT (JS)

  INTRODUCTION JS is very versatile Client-Side language. JS is mostly used for developing the understanding between the webpage and a client. We can also say, a webpage can be made more appealing and spirited, with the assistance of JS. JS may run on most of the internet browsers and on any Operating System. JavaScript is the number one and one of the best coding languages in the world and also very easy. JS along with CSS and HTML makes up the core building blocks of the Internet and the World Wide Web . Application of JavaScript in Web Development ·        JavaScript is utilized for creating web pages. ·        JavaScript is a stand-alone language which is developed in Netscape. ·        JavaScript is used when a website is to be made interactive and add special transitions used by all websites for the cause of validation. ·        JavaScript can ...

Back-end Development

  Web applications behind the scenes are controlled by Back-End Development. Back-end is used to create Front-end by utilizing a database. Back-end can be written in various coding system and dialects, for example, v php- php document is an ASCII record, made using any ASCII editor (Notepad and Notepad++). Html codes are written in php files and can be easily embedded. v JAVA- JAVA is one of the most liked programming languages. It was developed in early 90’s by sun microsystems. Father of Java is James Gosling and it is high level programming language. v Python- Python language is being utilized at both small and huge scale due its adaptable nature and numerous programming ideal models like object-oriented, imperative, functional and procedural.