FANDOM


You can create IDs and Classes in a Document, and then target the ID and Classes in the Stylesheet so you can style them.

The ID SelectorEdit

ID Selectors are started with an ID attribute in the document, then defined by a hash symbol which is "#" in the Stylesheet. They are used to specify a unique style for an element. An example can be seen below.

#OneParagraph {
    border:1px solid grey;
}

This would target the one element that has the ID "OneParagraph".

The Class SelectorEdit

Class Selectors are started with a CSS attribue in the document, then defined by a period symbol which is "." in the Stylesheet. They are used to specify a style for several elements. It might look like this below, which would make all elements with the class "Menu" have center-aligned text.

.Menu {
    text-align:center;
}

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.