Let's do In-line Styling - Chapter 3

Comments
Chapter 3
(This unit covers importance of In-line styling)

We have learnt about Comments in previous chapter. Now you know enough to write code in HTML.

Let’s put pedal to the metal and start doing some styling for our HTML pages. If you remember, HTML is like skeleton of your website and CSS is like skin & make-up on it.

In this session, we’ll learn about in-line styling and discuss the following:
  • What is in-line styling?
  • Why we need them?
  • How to use them?
What is in-line styling?
In-line styling simply means we can do some styling directly in our HTML files. No need to worry about separate CSS file.

Why we need them?
In-line styling is very important if our website needs only few styling changes. We can write styling code in our HTML file only.

Moreover, we’ll learn to do in-line styling first because after this learning CSS will be very easy.

How to use them?
Using in-line styling is very easy as it is use along with any other HTML tags used for text. (i.e. <p>, <h1> etc...)

We can give tags more command by inserting some attributes in the opening tag.

The main syntax is shown below:

<HTML Tag style = “attribute: value”>

Here HTML Tag can be <p> or <h1>, <h2> many more...
Style starts the in-line styling.
Attributes are characteristics such as font-size, font-color, font-family etc..
Value is simply values related specifically to its attributes.

For E.g.
The above example of in-line styling simply changes the color of font to red.

For any query related to this topic,please leave comment.

Do not spam as it will be removed.

0 comments:

Post a Comment