HTML CSS



CSS represents Flowing Templates.

CSS saves a great deal of work. It have some control over the design of various site pages at the same time

What is CSS?

Cascading Style Sheets (CSS) is used to format the layout of a webpage.

With CSS, you have some control over the variety, textual style, the size of text, the separating between components, how components are situated and spread out, what foundation pictures or foundation tones are to be utilized, various showcases for various gadgets and screen sizes, and significantly more!

Tip: The word flowing implies that a style applied to a parent component will likewise apply to all youngsters components inside the parent. Thus, assuming you set the shade of the body text to "blue", all headings, sections, and other text components inside the body will likewise get a similar variety (except if you indicate something different)!

Utilizing CSS

CSS can be added to HTML reports in 3 ways:

  • Inline - by utilizing the style quality inside HTML components
  • Inward - by involving a <style> component in the <head> segment
  • Outer - by utilizing a <link> component to connection to an outside CSS document

The most well-known method for adding CSS, is to keep the styles in outer CSS records. Notwithstanding, in this instructional exercise we will utilize inline and inner styles, since this is more straightforward to illustrate, and simpler for you to attempt it yourself.

Inline CSS

An inline CSS is utilized to apply an interesting style to a solitary HTML component.

An inline CSS utilizes the style quality of a HTML component.

The accompanying model sets the text shade of the <h1> component to blue, and the text shade of the <p> component to red:

<!DOCTYPE html>

<html>

       <body>

         <h1 style="color:blue;">A Blue      Heading</h1>

         <p style="color:red;">A red paragraph.</p>

        </body>

</html>

Inward CSS

An inward CSS is utilized to characterize a style for a solitary HTML page.

An inward CSS is characterized in the <head> part of a HTML page, inside a <style> component.

The accompanying model sets the text shade of ALL the <h1> components (on that page) to blue, and the text shade of ALL the <p> components to red. What's more, the page will be shown with a "powderblue" foundation tone:

<!DOCTYPE html>

<html>

<head>

<style>

body {background-variety: powderblue;}

                 h1 {color: blue;}

p {color: red;}

</style>

</head>

<body>

<h1>This is a heading</h1>

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

       </body>

</html> 

Post a Comment

0 Comments