The basic discussion about CSS has to be learned where and how to write CSS. CSS Rule can be written in 3 ways

1. Inline (Inline CSS): Earlier HTML tutorials used many inline CSS. CSS can be written by the style attribute inside the start tag of the HTML element. Details

2. Internal (Internal CSS): See detailed discussions on the following lines

3. External CSS: Creating a file with a new .css extension, writing CSS and connecting with the link tag in the HTML file works. Details

Internal (Internal CSS):

================================

Very simple. In any HTML document, the internal CSS is written using <style> tag <head> </ head>. Such as

<!DOCTYPE html>
 <html>
<head>
<style>
h1{
   color: #f00;
   background: yellow;
   text-align: center;
}
</style>
</head>
<body>
 
 <h1>Hello world</h1>
 
 <p>demo content goes here.</p>
 
 </body>
 </html>

Explanation: Internal CSS has been written from lines 4 to 10. Check out how to write CSS very well here. In this way CSS is written, meaning first selector (h1 in line number 4) and then one of the curly braces gives the property and its value. For example, a color of line number 6 and its value is #f00 (it is a color code that displays red color), so the rest are the same.

** Colon (:) should be displayed between the properties and its values and at the end of the semicolon (;), the code will not work, otherwise the code will not work.

** The rules written in the internal CSS <head> </ head> tag but will work even if the document is elsewhere (usually inside the body element).

** The quality of the properties is specific so only they can be used. For example, the text-align property can have 5 types of “left”, “right”, “center”, “justify”, “inherit”

If left, the text of the element will be shown on the left. If right, rightify will show the columns in the same column as shown in columns. If you center, then parental elements will be applied if you give time and inheritance.

Again, the color value should only be the name of any valid color code or color, but any color can be as I gave #foo if you want # 000 (black) or any other color you like, even the name of color can be given as maroon. For example, I gave the background property as yellow.