Friday, May 17, 2019

Html Studyguide

The general syntax of a CSS way of life incur is selector piazza1 value1 property2 value2 property3 value3 Order in which expression sh crimsons are interpreted. The more specific genius is applied sooner of the more general. 1. 2. 3. 4. 5. Browsers internal room poll User-defined air sheet Authors external style sheet Authors embedded style sheet Authors inline style sheet User-Defined Styles Almost all browsers allow drug abusers to modify the oversight rectifytings of the internal style sheet. external Style SheetsTo link to an external style sheet use the following text directly in a higher place the closing star text tag Embedded Style Sheets Styles are inserted directly within the head element of an HTML schedule exploitation the style element styles Or h1 Color red Text-align touch The order in which external and embedded style sheets are processed depends on the order in which they are listed within the HTML file.In the below example the loads the externa l style sheet first and then the embedded SS. If the order were switched the significationed SS gets processed after the embedded one. h1 Color red Text-align center Inline Styles Applied directly to specific elements using the style attribute Importing Style Sheets To import a style sheet to a master style sheet use the import line of reasoning BEFORE any new(prenominal) style rules import url(url) or for example import url(sa_styles. css)Exploring the Style cascade down As a general rule of thumb, all other things being equal, the more specific style is applied instead of the more general . An additional factor in applying a style sheet is that properties are passed from a parent element to its children in a process known as style inheritance. body colouration blue h1 text-align center If you need browsers to enforce a style, you slew append the authorized severalizeword to the style property, using the syntax property value mportant Defining Color in CSS A color value is a numerical expression that describes the properties of a color CSS means these intensities mathematically as a set of numbers called an RGB triplet, which has the set up color rgb(red, green, blue) colorredgreenblue background-color color color color or or or or color rgb(255,255,0) colorFFFF00 background-color rgb(255,255,0) or colorFFFF00 or colorwhite CSS also allows RGB value to be entered as hexadecimal numbers To set the background color of an element, use the below property where color is a color name or a color value.To set the foreground or text color of an element, use the following property color rgb(255,255,0) or or CSS3 also supports the soak Saturation Lightness (HSL) model that describes colors based on hue, saturation, and lightness hsl(hue, saturation, lightness) rgba(red, green, blue, opacity) hsl(360, cytosine%, 100%) rgba(255, 255, 255, 0. 8) hsla(360, 100%, 100%, 0. 2) CSS3 also allows page designers to augment RGB and HSL color with opacity where 0 = c ompletely transparent and 1 = completely opaque. hsla(hue, saturation, lightness, opacity) orSelectors and Text Styles Web pages are structured documents in which elements are nested within other elements, forming a hierarchy of elements. To create styles that take advantage of this tree structure, CSS allows you to create contextual selectors whose values represent the locations of elements within the hierarchy 1) 2) 3) 4) Parent elements Child elements Sibling elements Descendant elements Contextual Selectors Attribute Selectors Selectors also can be defined based on attributes and attribute values associated with elements.Two attributes, id and class, are often key in targeting styles to a specific element or group of elements. Styling Web Page Text The default font used by most browsers is Times New Roman, but you can specify a different font for any page element using the property font-family fonts or font-family Arial Black, gadget, sans-serif set Font Face and Sizes Sizes ca n be relative or absolute. To define a font face, use the style property font-family fonts font-size size letter-spacing size word-spacing size To specify the font style, use the below style where guinea pig is normal, italic, or oblique. ont-style type To specify the font weight, use the below format where type is normal, bold, bolder, light, lighter, or a font weight value. font-weight type To specify a text decoration, use the below format where type is none, underline, overline, or line-through. text-decoration type To transform text, use the below code where type is capitalize, uppercase, lowercase, or none. text-transform type To display a font variant of text, use the below format where type is normal or small-caps. ont-variant type You can combine most of the text and font styles into a wiz property using the shortcut font property font font-style font-variant font-weight font-size/line-height font-family Combining Text Format in a single style or or or font-family Arial B lack, gadget, sans-serif font-size 0. 5in or font-size 36pt font-size 0. 5in or font-size 3pc or font-size 1. 7em To set a font size, use the below style property where size is a CSS unit of length in either relative or absolute units.To set kerning (the space between letters), use the following style property To set tracking (the space between words), use the following style property excogitation a List To define the appearance of the list marker, use the style below where type is disc, circle, square, decimal, decimal-leading-zero, lower-roman, upper-roman, lower-alpha, upper-alpha, lower-greek, upper-greek, or none. list-style-type type To insert a graphic image as a list marker, use the style below where url is the URL of the graphic image file. ist-style-image url(url) To set the position of list markers, use the style below where position is inside or outside. list-style-position position To define all of the list style properties in a single style, use the following style li st-style type url(url) position To set the indentation of a list, apply the style below where size is the length that the list should be indented. padding-left size Using Pseudo-Classes and Pseudo-Elements A pseudo-class is a classification of an element based on its current status, position, or use in the document selectorpseudo-class styles Structural Psuedo Classes

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.