How to use for CSS

How-to-use-for-CSS

CSS stands for Cascading Style Sheets.

CSS saves a lot of types. It can control the layout of multiple web pages all at once.

CSS can we added to HTML elements in 3 type:

  • Inline – by using the style attribute in HTML and PHP elements.
  • Internal – by using a start <style> and end </style> element in the <head> section.
  • External – by using an external CSS file.

Inline CSS

An inline CSS is used to apply a unique style to a single HTML and PHP element.This example sets the text color of the <p> element to blue.
Example: <p style=”color:blue;”>This is a Blue Heading</p>

Internal CSS

An internal CSS is used to define a style for a single HTML and PHP  page.
An internal CSS is defined in the <head> section of an HTML page, within a start <style> and end </style>element:

Example: 
<!DOCTYPE html>
<html>
<head>
<style>
body {background-color: pink;}
p    {color: red;}
</style>
</head>
<body>

<p>This is a paragraph.</p>

</body>
</html>

External CSS

An external style sheet is used to define the style for one or many HTML and PHP pages.To use an external stylesheet, add a link to it in the <head> section of the HTML and PHP page:

Example: 
<!DOCTYPE html>
<html>
<head>
  <link rel="stylesheet" href="styles.css">
</head>
<body>

<p>This is a paragraph.</p>

</body>
</html>
Learn Tutorials Point
We Well organized and easy-to-understand Interactive tutorials With lots of examples of how to use Tutorials WordPress, PHP, Bootstrap, Bootstrap 4, HTML, CSS, AJAX, jQuery, Woocommerce, Post, Database, Javascript, Theme, Responsive, Templates.

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact us

Fill in the form below or give us a call and we'll contact you. We endeavour to answer all enquiries within 24 hours on business days.