Learn HTML,CSS, Python etc from the foundation

Wednesday, January 2, 2019

3 MOST IMPORTANT KINDS OF CSS YOU SHOULD KNOW| WITH EXAMPLES

No comments :


Hi, glad to meet you again on this platform. I can’t express how I feel being privileged to walk you through this journey of coding. Please do not misuse this opportunity. I spent thousands of money in order to acquire the knowledge I’m sharing with you free of charge. So I urge you to try all you can to practice along with me. Your success is my concern.
In today’s lesson, I am going to walk you through three different ways to introduce CSS in the HTML document.  The first one is introduced at the top of a web page and it is called Internal Cascading Style Sheet. The second one, on the other hand is introduced in a separate file and it is called External Cascading Style Sheet. And the last one is called Inline Cascading Style Sheet because it is introduced next to the content it beautifies. Below are careful but comprehensive explanations (garnished with resplendent examples) on the aforementioned. I’d like to start my explanation with the inline element for a purpose.
1.     Inline Cascading Style Sheet
Inline simply means that you are carrying out your styling within an element or tag in your HTML code. Put it differently, inline is the CSS  found in HTML. It is usually located in the head of a document between the style tags. An inline Style is very dangerous as it overrides any other style applied to a web page.  Many programmers, myself inclusive, dislike inline style probably because it makes codes messy and unreadable.  In fact, it makes a web page difficult to debug. This is not only frustrating to programmers but as well suicidal. The only good thing about the inline CSS is that it is cool when used to style e-mails.
A good example of inline CSS is expressed below.

<p style="color: white; background-color: black;">
            Codinglegit example of inline Cascading Style Sheet
</p>

It will look like this in your text editor

 
Save and open it. You will see something like this
 


WRAPPING UP

In our next lesson, we will be looking into the remaining two kinds, that is, Internal and external Cascading Style Sheet. Practice this as many times as possible so as not to get hooked up in our next lesson. Stay focused.





No comments :

Post a Comment