HTML Styles

By | August 7, 2018

By using style attribute we can set the style of an HTML element. The syntax of an style element is as follows-
<tagname style=”property:value;” >
Here property means the CSS property and value means the value of CSS.

Background Color property
To set the background color of an HTML element CSS has a property called background-color. For example we can set powderblue as the background of HTML body by using background-color property as follows-



  
    

This is the heading

This is the paragraph

BackgroundColor

Text Color property
We define the text color of an HTML element by using color property. Following example shows how we change the color of text by using color property-



  
    

This is the heading

This is the paragraph

Color
Fonts property
We define the font of an HTML element by using font-family property. Following example shows how we change the font of text by using font-family property-



  
    

This is the heading

This is the paragraph

fonts
Text Size property
We define the size of the text of an element by using font-size property. Following example shows how we can set the text size of an element-



  
    

This is the heading

This is the paragraph

textSize

Text Alignment
We set the horizontal text alignment for HTML element by using text-align property as follows-



  
    

This is the heading

This is the paragraph

TextAlignment

69 Total Views 1 Views Today
Md. Mojammel Haque

CSM, CSPO, CSD, CSP-SM, CSP-PO (ScrumAlliance.org)
Certification Profile Link-
https://www.scrumalliance.org/community/profile/mhaque13

Currently working as Lead Team (Application Architecture) at Raven Systems Ltd. Passion for software development especially agile practices such as TDD with in depth knowledge of Object Oriented Programming, SOLID Principles, Gang of Four Design Patterns, Some Enterprise Application Architectural Patterns. Over 8 years of software development experience ASP.NET. Has the ability to understand and transform complex business requirements into software ensuring applications are delivered on time. Also experience in non Microsoft .NET technologies such as Dapper.Net, Git, Structure Map & Angular, Bootstrap, HTML-5, CSS-3 etc.

Category: 1. Full Stack Web Development 1.01-HTML Uncategorized
Md. Mojammel Haque

About Md. Mojammel Haque

CSM, CSPO, CSD, CSP-SM, CSP-PO (ScrumAlliance.org) Certification Profile Link- https://www.scrumalliance.org/community/profile/mhaque13 Currently working as Lead Team (Application Architecture) at Raven Systems Ltd. Passion for software development especially agile practices such as TDD with in depth knowledge of Object Oriented Programming, SOLID Principles, Gang of Four Design Patterns, Some Enterprise Application Architectural Patterns. Over 8 years of software development experience ASP.NET. Has the ability to understand and transform complex business requirements into software ensuring applications are delivered on time. Also experience in non Microsoft .NET technologies such as Dapper.Net, Git, Structure Map & Angular, Bootstrap, HTML-5, CSS-3 etc.

Leave a Reply

Your email address will not be published. Required fields are marked *