How To Style Html Elements In Css?

Table of contents

No heading

No headings in the article.

We had established that HTML, are any text displayed on the computer screen and contains links to other hypertext documents (links.medium.com/eV3oLhzhWqb). whereby is it of 3 category; HTML, CSS AND JAVASCRIPT. Today we will be discussing how to style the html using CSS.

WHAT IS CSS? Cascading style sheet (CSS) is used to format the layout of a webpage, so, whatever layout implies to you attribute that to CSS. Basically it is used for styling. CSS controls, the font, size, color, margin, background image size and color etc. There are about three methods used in using CSS on html 1 INLINE: by using style attribute inside the html elements 2 INTERNAL: by using

this is a paragraph

this is a bigger paragraph

joy

INTERNAL CSS This is used to define an section within a

this is a paragraph

this is a bigger paragraph

joy

         **EXTERNAL CSS**

This is used to define the style for many html pages by linking the html to a CSS external style sheet Create a file using the#whatever.css Eg;

#styles.css HTML !DOCTYPE html>

       **#Styles.CSS**

/ P{ color:brown; } / .p1{ color:greenyellow; } .p2{ color:bisque; }

#p3{ color:blue; }

The CSS mode of defining an html is vast and cannot be exhausted in one class CSS MARGIN: Are used to define space outside the boarder

CSS PADDING: Are used to define space between text and boarder

CSS BOADER: Are used to define boarder around the html element

IN CONCLUSION: It is necessary to note that many times after styling, it doesn’t reflect on the browser thus making the developer feel like the code isn’t working. It is crucial to note that, Basic little errors could attribute to that, In cases whereby, the closing tag was omitted “>Or;” Though, there are three methods of using CSS On HTML. It is advised to use the EXTERNAL CSS; It is more organized and aids code readability.