Advertisement

Responsive Advertisement

CSS

 1.What is CSS define?

CSS is just like a language use for style a web page.CSS separates content (HTML) from design, allowing web developers to style multiple pages consistently with one stylesheet and making it easier to maintain and update the site’s design. CSS rules are applied by selectors targeting (HTML) elements, and styles are cascaded based on specificity, importance, and source order.

Something about CSS

  1. CSS stands for Cascading Style Sheets
  2. CSS describes how HTML elements are to be displayed on screen, paper, or in other media
  3. CSS saves a lot of work. It can control the layout of multiple web pages all at once
  4. External stylesheets are stored in CSS files
What are the uses of CSS?

CSS , Cascading Style Sheets   is used to style web pages and make them look visually appealing. 
Here is some uses of CSS in html because we know without html and without css and without javascript a website never look attractive.

Setting Colors: CSS (Cascading Style Sheets ) lets you change the color of text, backgrounds, borders, and other elements. For example, making headings blue or changing the background to a light color.

Adjusting Layouts: With CSS (Cascading Style Sheets), you can control how elements are arranged on the page. This includes setting up columns, centering items, and adjusting spacing between elements. You can create flexible or fixed layouts for different screen sizes.

Changing Fonts and Text Styles:   CSS  (Cascading Style Sheets) allows you to customize fonts, text sizes, and styles (like bold or italic) to match the theme of your website. You can even use custom fonts or add decorative effects.

Adding Spacing and Margins: CSS Cascading Style Sheets lets you control the amount of space around elements, creating padding (inside space) and margins (outside space) to make the content look clean and organized.

Making Pages Responsive:  CSS Cascading Style Sheets helps your website adapt to different screen sizes, like desktops, tablets, and smartphones. With media queries, you can adjust styles so the site looks good on any device.

Adding Animations and Effects: CSS Cascading Style Sheets can add animations, like buttons changing color when you hover over them, images fading in, or text sliding onto the page. These effects make a website more interactive and engaging. this is the uses of Css in HTML

NOTE: First read HTML then u can understand and u know uses of CSS



2. learn Syntax Of CSS with HTML.




  • Selector points (h1) to the HTML element you want to style.
  •  Declaration block contains one or more declarations separated by semicolons.
  • Each declaration includes a CSS Cascading Style Sheets property name and a value, separated by a colon.
  • Multiple CSS Cascading Style Sheets declarations are separated with semicolons (;), and declaration blocks are surrounded by curly braces{}.
  •  Here p is a selector in CSS  Cascading Style Sheets (it points to the HTML element you want to style: <p>).
  • And color is a property, and red is the property value
  • And the text-align is a property, and center is the property value

3. learn what is the of Selector in CSS?

In CSS, Cascading Style Sheets  selectors are used to target HTML elements that we want to style.

Basic Element Selection: Selectors target specific HTML elements, like <h1>, <p>, or <div>. For instance, p { color: red; } will make all paragraph text red.

Grouping and Organizing: Selectors allow you to apply the same style to multiple elements. For example, h1, h2, h3, h4, h5, h6 { font-family: Arial; } targets all header tags and gives them the same font.

Classes (.class-name): Used for styling multiple elements with a shared style. ex:- button { background-color: green; } applies green to all elements with the button class.













Post a Comment

0 Comments