How can use css in html?

how can use css in html ?

You don’t use CSS in html, you use it with HTML… And this question is too broad to answer. The best way (although not the only) is to create a CSS document and link it you your html page right in the HEAD area.

Examle: your css document is called mycss.css

then, your code in your html page would be

    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" > 
    <title>Title of the Page</title>    
    <link rel="stylesheet" type="text/css" href="mycss.css">

Another Two ways are:

  1. put the style tag in <head> like this:
    <style>/Css Contents here/</style>

  2. put on elements as attributes like this:
    <div style=“”></div>
    <a style=“”></a>
    –>This is not recommended.

This question is beyond basic, and has been answered. Thread closed.