HTML Styles

HTML Styles: In this instructional exercise, we will find out about the style trait of the labels in HTML, how to include some more styles/properties on a label utilizing it in HTML?

HTML style Attribute

The HTML style ascribe is utilized to include some style or add a few changes to the content in HTML. Style is adding some extra settings to make it appear to be unique from normal content.

In HTML the style property deals with styling components.

Syntax:

<tag style= "property1:value; property2:value; property3:value;.. "/>

This will add CSS you will figure out how to your tag for styling it.

You will find out about styles and CSS labels in CSS Tutorials. Here, we will cover just a portion of these styles by changing some content and website pages.

Changing the textual style of content in HTML

The textual style of family property is utilized to change the text style of content determined by the tag.

Example:

<!DOCTYPE html>

<html>

<body>
    <p style="font-family:courier;">
        I love to learn programming from JustTechReview
    </p>
</body>

</html>

Output

HTML Styles

Changing content size in HTML

The text dimension property is utilized to change the size of content determined by the tag.

Example:

<!DOCTYPE html>

<html>

<body>
    <p style="font-family:courier;font-size:50px">
        I love to learn programming from JustTechReview
    </p>
</body>

</html>

Output:

HTML Styles

Changing the content colour in HTML

The shading property is utilized to change the shade of content determined by the tag.

Example:

<!DOCTYPE html>

<html>

<body>
    <p style="font-family:'Monotype Corsiva';font-size:50px;color:#006969">
        I love to learn programming from JustTechReview
    </p>
</body>

</html>

Output:

HTML Styles

Changing background colour in HTML

The foundation shading property is utilized to indicate the foundation shade of the tag.

Example:

<!DOCTYPE html>

<html>

<body>
    <p style="font-size:50px;color:#006969;background-color:#00f400">
        I love to learn programming from JustTechReview
    </p>
</body>

</html>

Output:

HTML Styles

Changing the arrangement of content in HTML

The content adjusts property is utilized to change the size of content indicated by the tag.

Example:

<!DOCTYPE html>

<html>

<body>
    <p style="font-size:50px;color:#006969;background-color:#00f400;text-align:center;">
        I love to learn programming from JustTechReview
    </p>
</body>

</html>

Output:

HTML Styles

Leave a Comment

error: Alert: Content is protected!!