+ 1

Hello can someone explain how to combine html,css in one document and run

24th Dec 2020, 4:03 PM
Francis Chukwudi
Francis Chukwudi - avatar
3 Antworten
0
CSS can be added to HTML documents in 3 ways: Inline - by using the style attribute inside HTML elements Internal - by using a <style> element in the <head> section External - by using a <link> element to link to an external CSS file Example of inline-- <h1 style="color:blue;">A Blue Heading</h1> Example of internal-- <html> <head> <style> body {background-color: powderblue;} h1   {color: blue;} p    {color: red;} </style> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> </body> </html> Example of external -- add a link to the <head> section of each HTML page like this: <html> <head>   <link rel="stylesheet" href="styles.css"> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> </body> </html>
24th Dec 2020, 4:29 PM
CHANDAN ROY
CHANDAN ROY - avatar