Found 10483 Articles for Web Development

Including an external stylesheet file in your HTML document

varma
Updated on 30-Jan-2020 08:25:06

587 Views

The element can be used to include an external style sheet file in your HTML document.An external style sheet is a separate text file with .css extension. You define all the Style rules within this text file and then you can include this file in any HTML document using element.Consider a simple style sheet file with a name new.css having the following rules:h1, h2, h3 {    color: #36C;    font-weight: normal;    letter-spacing: .4em;    margin-bottom: 1em;    text-transform: lowercase; }Now you can include this file new.css in any HTML document as follows:    

How to use style attribute to define style rules?

karthikeya Boyini
Updated on 30-Jan-2020 08:23:24

337 Views

You can use style attribute of any HTML element to define style rules. These rules will be applied to that element only. Here is the generic syntax:The following is an example:                   This is inline CSS    

Working with