UrbanPro
true

Learn HTML from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

HTML Style Attribute

Rahul Dekar
30/03/2017 0 0

Setting the style of an HTML element, can be done with the style attribute.

<tagname style="property:value;">
 
Ex -
 

HTML Background Color

The background-color property defines the background color for an HTML element.

This example sets the background color for a page to light grey:

<html>

<head><title>HTML Style Attribute</title></head>

<body style="background-color:lightgrey;">

<h1>This is a heading</h1>
<p>This is a paragraph.</p>

</body>

</html>

0 Dislike
Follow 0

Please Enter a comment

Submit

Other Lessons for You

Awesome rotating Image on hover | HTML5, CSS3
Hello everyone let's see how to make an awesome rotating image on hover with HTML 5.0 and CSS 3.0. STEP 1: In HTML code put an image with the HTML tag STEP 2: Style that image however you want. Below...

HTML5 new ways of HTML.
If you learn HTML5 then you will learn all HTML and XHTML and new tools. There is new ways of representation in HTML5. So try learning HTML5.

Palash Roy

0 0
0

Add shadows to boxes with HTML 5.0 and CSS 3.0
1) Hi! lets learn how to drop shadows for the boxes. First let's create a simple box in html <!doctype html><html><div>Hi this is a box</div></html> 2) Now lets give it...

HTML5 Style Guide And Coding Conventions Part 3
Close All HTML Elements In HTML5, you don't have to close all elements (for example the <p> element). We recommend closing all HTML elements. Bad: <section> <p>This is a paragraph....

What Is PHP?
PHP stands for PHP: Hypertext Preprocessor PHP is a widely-used, open source scripting language PHP scripts are executed on the server PHP is free to download and use PHP files can contain text,...
X

Looking for HTML Classes?

The best tutors for HTML Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn HTML with the Best Tutors

The best Tutors for HTML Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more