Sideway
output.to from Sideway
Draft for Information Only

Content

Selectors
   Universal selector CSS2.1
   Type Selectors CSS2.1
   Descendant selectors CSS2.1
   Child selectors CSS2.1
   Adjacent selectors CSS2.1
   Attribute selectors CSS2.1
   Class Selectors CSS2.1
   ID Selectors CSS2.1
   Pseudo-Class CSS2.1
   Pseudo-Element CSS2.1
  CSS Standard

Selectors

In order to make CSS more flexible and simple to apply, a number of patterns are provided for manipulating CSS rules.

Universal selector CSS2.1

This is a styling method to redefine any element. e.g. any element

* { color: blue }

Type Selectors CSS2.1

This is a styling method to redefine the presentation style of existing elements. e.g. h2

h2 { color: blue }

Descendant selectors CSS2.1

This is a styling method to redefine the presentation style of existing elements that is a descendant of another element. e.g. em, nested anywhere within  h2,

h2 em { color: blue }

Child selectors CSS2.1

This is a styling method to redefine the presentation style of existing elements that is a child of another element. e.g. em, nested as a child within h2,

h2 > em { color: blue }

Adjacent selectors CSS2.1

This is a styling method to redefine the presentation style of existing elements that immediately follow another element, and both elements share the same parent. e.g. h2 follows h1 within body,

h1 + h2 { color: blue }

Attribute selectors CSS2.1

This is a styling method to redefine the presentation style of existing elements that match the specified attribute conditions.

h1[title] { color: blue }
h1[title="example"] { color: blue }
h1[title~="example"] { color: blue }
h1[lang|="en"] { color: blue }
h1[title="example"][lang|="en"] { color: blue }

Class Selectors CSS2.1

This is a styling method used in HTML to redefine the presentation style of existing elements that match the specified class attribute conditions.

.head1 { color: blue }
*.head1 { color: blue }
h1.heat1 { color: blue }
h1.heat.blue { color: blue }

ID Selectors CSS2.1

This is a styling method to redefine the presentation style of existing elements that match the specified id attribute conditions.

h1#titleid { color: blue }

Pseudo-Class CSS2.1

This is a styling method to redefine the presentation style of existing elements that match the specified  state.

p:first-child { color: blue }
*>p:first-child { color: blue }
h1>p:first-child { color: blue }
:link { color: blue }
a:link { color: blue }
:visited { color: blue }
a:visited { color: blue }
a.head1:visited { color: blue }
a:hover { color: blue }
a:active { color: blue }
a:focus { color: blue }
a:focus:hover { color: blue }
html:lang(fr) { color: blue }
:lang(fr) { color: blue }
:lang(fr) > h1{ color: blue }

Pseudo-Element CSS2.1

This is a styling method to redefine the presentation style of existing elements that match the specified part of an element.

p:first-line { color: blue }
p:first-letter { color: blue }
p:before { color: blue }
p:after { color: blue }

CSS Standard

CSS References..........


©sideway

ID: 190400008 Last Updated: 4/8/2019 Revision: 0 Ref:

close

References

  1. http://www.w3.org/TR/1999/REC-html401-1999, 1999, HTML 4.01 Specification: W3C Recommendation, updated 24 December 1999
close

Latest Updated LinksValid XHTML 1.0 Transitional Valid CSS!Nu Html Checker Firefox53 Chromena IExplorerna
IMAGE

Home 5

Business

Management

HBR 3

Information

Recreation

Hobbies 8

Culture

Chinese 1097

English 339new

Travel 8new

Reference 79

Computer

Hardware 251

Software

Application 213

Digitization 32

Latex 52

Manim 205

KB 1

Numeric 19

Programming

Web 289

Unicode 504

HTML 66

CSS 65

SVG 46

ASP.NET 270

OS 431

DeskTop 7

Python 72

Knowledge

Mathematics

Formulas 8

Set 1

Logic 1

Algebra 84

Number Theory 206

Trigonometry 31

Geometry 34

Coordinate Geometry 2

Calculus 67

Complex Analysis 21

Engineering

Tables 8

Mechanical

Mechanics 1

Rigid Bodies

Statics 92

Dynamics 37

Fluid 5

Fluid Kinematics 5

Control

Process Control 1

Acoustics 19

FiniteElement 2

Natural Sciences

Matter 1

Electric 27

Biology 1

Geography 1


Copyright © 2000-2024 Sideway . All rights reserved Disclaimers last modified on 06 September 2019