Inline Styling Our HTML Page
Explore how to apply inline styling to your HTML page using the style attribute. Learn to modify header colors and margins directly within your HTML tags and see your changes in real time. This lesson helps you practice coding inline CSS, understand its effects, and prepare for more advanced styling techniques.
We will be using the style attribute in our HTML code to beautify our web page! The way we’ll do that is the same as always, with a code along exercise!
Exercise: Using the style attribute to adorn a web page
To apply style attributes to index.html, follow these steps:
Step 1:
In the index.html file from the previous lesson, remove the <p> element from the <body> section and add more content as the highlighted markup shows:
Live coding widget
Use our live coding ...