CSS Tutorial
CSS is added to HTML pages to format the document according to information in the style sheet.
There are three ways of inserting a style sheet.
Inline CSS is used to apply CSS on a single line or element.
To use inline styles, add the style attribute to the relevant element.
The value of style attribute is a combination of style declarations separated by semicolon (;).
These styles are not good to be edited because they are not stored at a single place.
When the above code is compiled , it produces the following result.
Code Always.
Code Always To Become Best Programmer.
Internal CSS is used to apply CSS on a single document or page.
Internal styles are defined within the <style> element, inside the <head>section of an HTML page
The value of style attribute is a combination of style declarations separated by semicolon (;).
When the above code is compiled , it produces the following result.
Code Always.
Code Always To Become Best Programmer.
External CSS is used to apply CSS on multiple pages or all pages.
Each HTML page must include a reference to the external style sheet file inside the <link> element, inside the head section.
we write all the CSS code in a css file. Its extension must be .css.
The value of style attribute is a combination of style declarations separated by semicolon (;).
The HTML and The CSS file are in separate file.
You need to link this externalstyle.css file to your html pages.
The link tag must be used inside head section of html.
When the above code is compiled , it produces the following result.
Code Always.
Code Always To Become Best Programmer.