css-types

There are four ways to interact styles with your HTML document. Most commonly used methods are inline CSS and External CSS. Embedded CSS – The <style> Element You can put your CSS styles into an HTML document using the <style> element. This tag is placed inside the <head>…</head> tag. <!DOCTYPE html> <html> <head> <style type = “text/css” media = “all”> body { background-color: linen; } h1 { color: maroon; margin-left: 40px; } </style> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> </body> </html> Inline CSS – The style Attribute You can use the style attribute of any HTML …