What is CSS with example?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SwatiSood
    Member
    • Jul 2014
    • 91

    What is CSS with example?

    CSS can be used to define the cell padding of table cells, the style, thickness, and color of a table's border, and the padding around images or other objects. CSS gives Web developers more exact control over how Web pages will look than HTML does.
  • lisajohn
    Senior Member
    • May 2007
    • 218

    #2
    CSS is the language for describing the presentation of Web pages, including colors, layout, and fonts. It allows one to adapt the presentation to different types of devices, such as large screens, small screens, or printers. CSS is independent of HTML and can be used with any XML-based markup language.

    Comment

    • Guest

      #3
      Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language such as HTML. CSS is a cornerstone technology of the World Wide Web, alongside HTML and JavaScript.

      Comment

      • megri
        Administrator
        • Mar 2004
        • 805

        #4
        CSS, or Cascading Style Sheets, is the language that gives web pages their style and layout. It controls how elements appear on screen, from fonts and colors to spacing and positioning.

        Here's how it works:

        HTML provides the structure: Think of HTML as the bones of a website. It defines the content and its organization using elements like headings, paragraphs, lists, and images.
        CSS adds the visual style: CSS acts as the clothing and makeup, defining how those elements look. It allows you to customize fonts, colors, backgrounds, borders, spacing, and more.
        Here's a simple example:

        HTML:

        HTML
        <h1>This is a Heading</h1>
        <p>This is a paragraph.</p>
        Use code with caution. Learn more

        CSS:

        CSS
        h1 {
        color: blue;
        font-size: 36px;
        }

        p {
        color: gray;
        font-size: 16px;
        margin-top: 10px;
        }

        Use code with caution. Learn more
        The result:

        Key CSS features:

        Selectors: Target specific HTML elements to apply styles.
        Properties: Define the visual aspects to change (e.g., color, font-size, margin).
        Values: Set the desired appearance for each property.
        Rules: Combine selectors and properties to create style instructions.
        External stylesheets: Keep styles organized and reusable in separate files.
        CSS is essential for creating visually appealing and user-friendly web experiences. It allows you to control every aspect of a webpage's appearance, ensuring a consistent and engaging design across different devices and screen sizes.
        Parveen K - Forum Administrator
        SEO India - TalkingCity Forum Rules - Webmaster Forum
        Please Do Not Spam Our Forum

        Comment

        Working...
        😀
        😂
        🥰
        😘
        🤢
        😎
        😞
        😡
        👍
        👎