
CSS Part 1
What is CSS? It is used to style and design webpages. HTML creates the structure(like headings, text, images) css makes it look beautiful(colors,layout,font,spacing). Basic CSS structure consist of selector, Property, and value. Selector - What to style. Property - What to change. Value - How to change. Important Rule : Each property ends with ; Properties are inside { } Selector comes before { } In the below example p → selector color → property red → value Example : <html> <head> <style> /* css styling part */ p { color : blue ; font-size : 20px ; } </style> </head> <body> <p> This is HTML </p> </body> </html> Three main ways to add CSS to a HTML page: Inline CSS. CSS is written inside the HTML Tag. <p style= "color: red; font-size: 20px;" > This is HTML </p> Internal CSS. CSS is written inside <style> tag in <head> . <head> <style> p { color : blue ; font-size : 20px ; } </style> </head> External CSS. CSS is written in a separate file. Step 1 : Create a CSS file p { color : blue ; f
Continue reading on Dev.to Tutorial
Opens in a new tab



