Skip to content

Lecon-a/learn_web_dev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

To add css to your html file, use the following methods

  • Inline styling
    <p style="color:red; background-color: black;">This is how we add inline style</p>

    <open tagname>content</close tagname> <<= this is called html element
  • Internal styling
<head>
    <style>
        #para {
            color: white;
            background-color: black;
            padding: 2rem;
        }
    </style>
</head>

<body>
    <p id="para" class="para">This is how we add inline style</p>
</body>
  • External styling
    create an external file with the extension of css e.g style.css

    import the file into html file
    How do we do this?

    <head>
        <link rel="stylesheet" href="cssFileName.css">
    </head>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published