Articles on Trending Technologies

Technical articles with clear explanations and examples

How to set font size using CSS Measurement Unit vmin?

mkotla
mkotla
Updated on 30-Jan-2020 234 Views

To set font size with CSS Measurement Unit vmin, try to run the following code:                            This div has relative positioning.          

Read More

Including an external stylesheet file in your HTML document

varma
varma
Updated on 30-Jan-2020 632 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:    

Read More

Rules to override Style Sheet Rule in CSS

varun
varun
Updated on 30-Jan-2020 3K+ Views

The following is the rule to override any Style Sheet Rule.Any inline stylesheet takes the highest priority. Therefore, it will override any rule defined in ... tags or rules defined in an external style sheet file.Any rule defined in ... tags will override rules defined in any external style sheet file.Any rule defined in external style sheet file takes the lowest priority, and rules defined in this file will be applied only when above two rules are not applicable

Read More

How to use style attribute to define style rules?

karthikeya Boyini
karthikeya Boyini
Updated on 30-Jan-2020 359 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    

Read More

What are the ways to include style sheet rules in an HTML document

seetha
seetha
Updated on 30-Jan-2020 591 Views

To include stylesheet rules, use the element or style attribute or even external stylesheet using .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.Here is the syntax of including external CSS file:     The following are the attributes of a element:AttributeValueDescriptionTypetext/cssSpecifies the style sheet language as a content-type (MIME type). This attribute is required.HrefURLSpecifies ...

Read More

Working with Inline CSS

Prabhas
Prabhas
Updated on 30-Jan-2020 423 Views

Associate styles with your HTML document using methods inline CSS and External CSS.You can use style attribute of any HTML element to define inline style rules. These rules will be applied to that element only. Here is the generic syntax:The following is the attribute:AttributeValueDescriptionstylestyle rulesThe value of style attribute is a combination of style declarations separated by a semicolon (;).Let us see an example:                   This is inline CSS    

Read More

Usage of text-transform property in CSS

karthikeya Boyini
karthikeya Boyini
Updated on 30-Jan-2020 157 Views

The text-transform property is used to capitalize text or convert text to uppercase or lowercase letters.ExamplePossible values are none, capitalize, uppercase, lowercase.                            This will be capitalized                      This will be in uppercase                      This will be in lowercase          

Read More

Working with <style> element for CSS

Samual Sam
Samual Sam
Updated on 30-Jan-2020 61 Views

You can put your CSS rules into an HTML document using the element. This tag is placed inside ... tags. Rules defined using this syntax will be applied to all the elements available in the document.ExampleFollowing is an example of embedded CSS using the element:                    body {             background-color: linen;          }          h1 {             color: maroon;             margin-left: 40px;          }                     This is a heading       This is a paragraph.    

Read More

How to define multiple style rules for a single element in CSS?

Samual Sam
Samual Sam
Updated on 30-Jan-2020 1K+ Views

You may need to define multiple style rules for a single element. You can define these rules to combine multiple properties and corresponding values into a single block as defined in the following example: h1 {    color: #36C; font-weight: normal;    letter-spacing: .4em;    margin-bottom: 1em;    text-transform: lowercase; }Here all the property and value pairs are separated by a semicolon (;). You can keep them in a single line or multiple lines. For better readability, we keep them on separate lines.

Read More

Class Selectors in CSS

karthikeya Boyini
karthikeya Boyini
Updated on 30-Jan-2020 651 Views

You can define style rules based on the class attribute of the elements. All the elements having that class will be formatted according to the defined rule..black {    color: #808000; }This rule renders the content in black for every element with class attribute set to black in our document. You can make it a bit more particular. For example:h1.black {    color: #808000; }This rule renders the content in black for only elements with class attribute set to black.You can apply more than one class selectors to given element. Consider the following example:    This para will be ...

Read More
Showing 52621–52630 of 61,248 articles
Advertisements