ict

Cards (11)

  • css means Cascading Style Sheets. it is the language we use to style a Web page. it describes how HTML elements are to be displayed on screen, paper, or in other media. it saves a lot of work. It can control the layout of multiple web pages all at once
    CSS is used to define styles for your web pages, including the design, layout and variations in display for different devices and screen sizes.
    • The selector points to the HTML element you want to style.
    • The declaration block contains one or more declarations separated by semicolons
    • Each declaration includes a CSS property name and a value, separated by a colon.
    • Multiple CSS declarations are separated with semicolons, and declaration blocks are surrounded by curly braces.
    • p is a selector in CSS       (it points to the HTML element you want to    style: <p>)
    • text-align is a property, and center is the property value
  • A CSS selector selects the HTML element(s) you want to style.
  • CSS selectors are used to "find" (or select) the HTML elements you want to style.
    • Simple selectors (select elements based on name, id, class)
    • Combinator selectors (select elements based on a specific relationship between them)
    • Pseudo-class selectors (select elements based on a certain state)
    • Pseudo-elements selectors (select and style a part of an element)
    • Attribute selectors (select elements based on an attribute or attribute value)
  • There are three ways of inserting a style sheet:
    • External CSS
    • Internal CSS
    • Inline CSS
  • EXTERNAL CSS
    • It is a form of CSS that is used to add styling to multiple HTML pages at a time. 
    • It helps to design the layout of many HTML web pages simultaneously. 
    • The external CSS is always saved with the .css extension, and through this file, we can change the complete style of our HTML web page.
  • EXTERNAL STYLE SHEET
    <LINK> TAG - It defines the relationship between a html document and an external resource. The <link> tag is mostly used to link style sheets file to html pages.
  • INTERNAL CSS
    • An internal style sheet may be used if one single HTML page has a unique style.
    • The internal style is defined inside the <style> element, inside the head section.
  • INLINE CSS
    • It is used to style a specific HTML element. For this CSS style, you’ll only need to add the style attribute to each HTML tag, without using selectors.
    • You don’t need to create and upload a separate document as in the external style.