Moment Of Life !!

Friday 9 December 2016

  HTML Styles

      The style attribute is a new HTML attribute. It introduces CSS to HTML. Look! Styles and colors This text is in Verdana and red This text is in Times and green This text is 30 pixels high The HTML Style Attribute The purpose of the style attribute is: To provide a common way to style all HTML elements. Styles was introduced with HTML 4, as the new and preferred way to style HTML elements. With HTML styles, styles can be added to HTML elements directly by using the style attribute, or indirectly by in separate style sheets (CSS files). You can learn everything about styles and CSS in our CSS tutorial. 

 In our HTML tutorial we use the style attribute to introduce you to HTML styles. HTML Style Examples style="background-color:yellow" style="font-size:10px" style="font-family:Times" style="text-align:center" Deprecated Tags and Attributes In HTML 4, some tags and attributes are defined as deprecated. Deprecated means that they will not be supported in future versions of HTML and XHTML. The message is clear: Avoid the use of deprecated tags and attributes. These tags and attributes should be avoided: Tags Description
Defines centered content and Defines HTML fonts and Defines strikeout text Defines underlined text     Attributes   align Defines the alignment of text bgcolor Defines the background color color Defines the text color For all the above: Use styles instead. Style Examples: Background Color The style attribute defines a style for the element. The new style attribute makes the "old" bgcolor attribute obsolete. Font Family, Color and Size

The new style attribute makes the old tag obsolete. Text Alignment

The style attribute defines a style for the

element. The new style attribute makes the old "align" attribute obsolete.  

Share:

0 comments:

Blog Archive

Recent Comments

Site Counter

Flag Counter

Support