Close Menu
    Facebook X (Twitter) Instagram
    Oixiesoft
    • Home
    • Services
      • WordPress Malware Removal
      • Fix WordPress Errors
      • WordPress Website Development
    • Articles
    • Contact
    Oixiesoft
    Home»Tutorial»html»HTML Styles – CSS
    html

    HTML Styles – CSS

    Editorial StaffBy Editorial StaffUpdated:April 25, 2022No Comments2 Mins Read
    Share
    Facebook Twitter LinkedIn Pinterest Email

    What is CSS?

    Style sheets define how documents are shown on web pages.

    With CSS, you can determine the number of style properties such as color, the size of text, font, and background colors for a given HTML element.

    Each property has a name and a value and is separated by a colon (:). Each property statement is separated by a semi-colon (;).

    Using CSS

    There are listed below three ways of adding a style sheet in an HTML document:

    • External– using a <link> tag
    • Internal-using a <style> tag
    • Inline –using the style attribute

    External Style Sheet:

    If you have to give exact look and feel to multiple pages then save all the style sheet rules in a single style sheet file. You can include a style sheet file into all HTML documents or pages using the <link> element.

    <head>
    <link rel="stylesheet" type="text/css"
    href="style.css">
    </head>
    

    Internal Style Sheet:

    In the internal style sheet, you can use CSS style to a single Html page only. You can define css rules in the <head>section and within a <style>element.

    <head>
    <style type="text/css">
    body {background-color: black;}
    h2   {color: green;}
    p    {color: orange;}
    </style>
    </head>
    

    Inline Style Sheet:

    Inline Style Sheet is apply style sheet rules directly to any HTML element. These changes should be done only to a particular HTML element only. To use inline styles you can use the style attribute in the appropriate tag.

    <h2 style="color:gree;">A Green h2 Heading here</h2>
    
    <p style="color:blue;">A blue paragraph here.</p>
    
    Share. Facebook Twitter Pinterest LinkedIn WhatsApp Reddit Tumblr Email
    Editorial Staff

    Related Posts

    CodeIgniter vs Laravel: A Detailed Side-by-Side Comparison

    Python Arrays

    Python Lambda

    • HTML Introduction
    • HTML Editors
    • HTML Tags
    • HTML Attributes
    • HTML Headings
    • HTML Paragraphs
    • HTML Comments
    • HTML Styles
    • HTML Text Formatting
    • HTML Colors
    • HTML links
    • HTML Images
    • HTML Styles – CSS
    • HTML Tables
    • HTML Lists
    • HTML Forms
    Services
    • Web Development
    • Mobile Application Development
    • WordPress Malware Removal Service
    • Website Design
    • WordPress Development
    • Magento Development
    • Shopify Development
    • SEO Services
    Blog
    • How to Fix the Error Establishing a Database Connection
    • Ping List WordPress
    • How To Fix Japanese Keyword Hack
    • How to remove Malware from WordPress
    Hire Developers
    • Hire WordPress Developer
    • Hire Shopify Developer
    Contact Info
    • Oixiesoft Technologies
      A-40, Block A, I thum Tower, Sector 62, Noida
    • sales@oixiesoft.com
    • Privacy Policy
    • About Us
    • Contact Us
    © 2025 OixieSoft Technologies

    Type above and press Enter to search. Press Esc to cancel.