Showing posts with label external css example. Show all posts
Showing posts with label external css example. Show all posts

Sunday, February 4, 2024

external css in html

 

External CSS


1]  External css refers to Cascading style sheets that are store that are stored in separate file.

2]  External CSS  linked to HTML documents using the  '<link> ' element.

3]  External css method allows for the separation of the presentation  (style) from the
    content (html structure ) 

4]  External css easier to manage and maintain large-scale  website.

5]  Create a css file Save your  css rules in a separate file with a  ' .css ' extension.
        Example - file name :- ' styles.css '

External  css 

Example :-


7] Link the css file to your Html  document :- 
      
      1]    <head>  section of your html document add.
      2]   <link> element  with the ' rel ' attribute  set  to " stylesheet " and .
      3]  ' href ' attribute  pointing to the location of your css file.


External html  

Example :-

html code
<!DOCTYPE html>
<html>
<head>
      <title>External CSS</title>
      <link rel ="stylesheet" href="styles.css">
</head>
<body>
<div>
        <h1>Learn programming Language</h1>
        <p> easy to undestand html ,css js in webdesigningtheory.blogspot.com</p>
   
    </div>
</body>
</html>

External CSS

Example :-


/* style.css */
body
{
    font-family: sans-serif;
    background-color:palevioletred;
}
h1
{
    color :aqua;
 }
 h2
{
    color:antiquewhite;
 }
.container
{
    width: 80%;
    margin:auto;
}

External CSS

Output :-

External CSS EXAMPLE output











READ MORE

inline css in html

internal css

css introduction

html bdi tag

Abbr tag in html

html background image

login form

split screen

css table property