Three ways to use CSS inline style: <!doctype html>
<meta charset= "UTF-8" >
<title>css in-line style </title>
<body>
<div style= "width:100px;height:100px;background:red;" ></div>
</body>
inline style:!doctype html>
<meta charset= "UTF-8" >
<TITLE>CSS Inline Styling </title>
<body>
<style type= "Text/css" >
#div {width:100px;height:100px;background:red;}
</style>
<div id= "Div" ></div>>
</body>
External style: <!doctype html>
<meta charset= "UTF-8" >
<TITLE>CSS Inline Styling </title>
<link rel= "stylesheet" type= "Text/css" href= "Css.css" >
<body>
<div id= "Div" ></div>>
</body>
CSS file
div{width:100px;height:100px;background:red;}
Simply:
- Inline style: Is the code written in a specific page in an element, such as: <div style= "color: #f00" ></DIV>.
- Inline style: It is written in front of
- External style: refers to external CSS files, such as: <link href= "Css.css" type= "Text/css" rel= "stylesheet";
Three ways to use CSS