Skip to main content

Posts

Showing posts from November, 2023

TYPES OF CSS

We can write a CSS 3 ways in HTML  👉 Inline CSS: Description: Applied directly within HTML tags using the style attribute. Use Case: Ideal for small-scale styling adjustments on specific elements. Example:          <p style="color:blue; font-size 16px;"> This is Inline css </p>   👉Internal or Embedded CSS: Description: Placed within the <style> tags in the HTML <head> section. Use Case: Suited for styling a specific webpage; allows for a balance between specificity and reusability. Example: <head> <style> h1{color:green;} p{font-size: 16px;} </style> </head>  👉External CSS: Description: Defined in a separate CSS file and linked to HTML using the <link> tag. Use Case: Promotes reusability across multiple pages; facilitates a centralized approach to styling. Example (HTML): <head> <link rel="stylesheet" type="text/css" href="style.css"> </head>

What is CSS (Cascading Style Sheet)

Cascading Style Sheets (CSS): In the dynamic world of web development, HTML (Hypertext Markup Language) serves as the foundation, laying out the structure of a webpage. However, for a webpage to captivate its audience with visually appealing designs and layouts, it requires the artistic touch of CSS, or Cascading Style Sheets. 👉Defining CSS: CSS is a style sheet language used to describe the presentation of a document written in HTML or XML. It enables web developers to control the visual aspects of a webpage, such as colors, fonts, spacing, and positioning, without altering the underlying structure defined by HTML. The term "Cascading" in CSS refers to the order of priority the styles are applied, allowing for flexibility and consistency. 👉Separation of Concerns: One of the key principles of web development is the separation of concerns, and CSS plays a crucial role in achieving this. While HTML focuses on the structure and content of a webpage, CSS handles the aesthetics