Skip to main content

Posts

Showing posts with the label CSS

Recent Posts

Latest News

● Posts on CSS and SEO coming soon ...●

Font property in CSS

Using font properties in CSS : Font family : this property defines a list of font family names or generic names. List of font family or generic family(font families with similar look ) names helps if one font is not displayed, the next font will be displayed depends on availability of font in user system.  Eg. P {font family : ‘Impact' }  This font displayed in my system but in other system it is displayed as default value, so if font is not available in system so browser will  be display default font family. If font has more than one word then use quotation mark('     '). Font style : this property define how to style  the font. It has values italic, oblique(text is slanted to specific angle similar to italic), normal(default). Font weight : this property increase weight of font or thickness the text. It has values normal (default), lighter, bold, bolder ( this specifies weight of font relative to default or parent value.).  We can also spe...

Selectors in CSS

  What are Selectors & Types of selectors in HTML? Selector defines HTML element to be styled. Selectors can contains more than one HTML elements. The  Selectors in CSS have four type: • ID selector :  ID Selector is used to style specific element with a unique id. Id is represented by ‘#' in Style sheet. Id represents unique name to HTML element and created by using id attribute of HTML elements. Id selector is used as follows: #nameofid{ property and value } • Class selector :  Class selector is used to style multiple elements in a specific class. Class is represented by period (.) In style sheet. Class name can be created by using class attribute of HTML elements. Class selector is used as follows: .nameofclass( Property and value )   • Group selector :  Group selector is used to style all elements in a group. With help of Group selectors we can apply same style of different elements without writing them multiple times. Group selector is used ...

Types of Style Sheets in CSS

  How we can insert CSS in HTML code? There are 3 ways to insert  CSS in HTML to style webpage inline, internal and external CSS. Let’s understand this three types of CSS. 1. Inline CSS : Inline CSS can be inserted in HTML by using style attribute. All container tags have style attribute. Inline CSS design is only applied to element in which style attribute is used. Inline CSS is not much recommended to use for styling multiple elements because this make HTML code more complex and it becomes difficult to maintain styling and content. HTML Code will be easy to understand if content and styling are separated. Syntax is <tag style="";>content<tag>     (the code is written big to realize that how inline style can complicates the HTML code) 2. Internal CSS : Internal CSS can be inserted in HTML by using <style> tag in head section of HTML document. With internal CSS we can apply style sheet on a page where style tag is used i.e. it can apply style sh...

Introduction to CSS

  What is CSS and for what purpose it is used? CSS stands for cascading style sheet and it is used to design webpage, to give a beautiful appearance to the webpage. It also defines proper orientation of entities in a webpage or it allows sort the content.  CSS is used for advanced webpage designing which is impossible by using HTML formatting elements and various attributes. CSS allows to separate content from a style which improves readability. We can insert CSS  with help of HTML code, to use CSS you need to have basic knowledge about HTML like container tags and their attributes, linking one page to another, inserting images, and colors.  We can insert CSS in HTML by 3 different types: 1. Inline CSS  2. Internal CSS 3. External CSS (We will see them in later posts.) There are some attributes in lower versions of HTML which are not used or they are deprecated. HTML5 recommends styling webpages with CSS. CSS3 is current major version of CSS and it is su...