CSS (Cascading Style Sheets) is a language with which you can design an internet page beautifully. You can give all tags in HTML the properties you want. There are several options to do this smartly in CSS. This article will discuss a number of options for playing with CSS.
Group
It is possible to group multiple Selectors in one definition. This means you only have to write down the definition of the desired style once.
Example:
H1, H2, H3 {
Font weight: 600;
Font size: 12px;
Font family: arial}
Additional Options Selectors
You may need multiple types of paragraphs in your text. Think of quoting someone where you want to make it clear that it is a different kind of text than the rest. By using only the Selector P, you give all paragraphs the same layout. But the solution to the problem lies in defining a Class.
Example
<HTML>
<HEAD>
<TITLE>Quotes</TITLE>
<STYLE TYPE=” text/CSS”>
P.quote { font-size: 10px; font-style: italic;}
</STYLE>
</HEAD>
<BODY>
<p CLASS=”quote”>I have a dream!!</p>
</BODY>
</HTML>
Name the specific paragraph to assign, you distinguish between the regular P and the P with a quote. In the future, you can therefore indicate very precisely per paragraph how you want to see the layout.
Reading Suggestions: Process Discovery and its Impact on Business Processes
In the example, this is done by first defining P.quote. Then you define the format of the paragraph. Then you come across a paragraph in the text of the site in which you include a quote. At that point, you start the paragraph with the <P> tag and add the words: class=” quote”.
You can assign a Class to all Selectors. You can define the Class in your style sheet and you can refer to this Class on your site. But you can make your style sheet even more flexible by defining a number of Classes yourself. You can then assign the Class to any Selector. In the example below you can see what it means.
Example
<STYLE TYPE=” text/CSS”>
.quote { font-size: 10px; font-style: italic;}
</STYLE>
In your HTML code, you can now assign the class quote to any tag you want. This is done by adding the words class=” quote” to the table tag <td>, for example. In the next part, you can assign the class to another tag. The flexibility and possibilities of CSS are therefore endless.
ID
Instead of defining a Class, you can also define an Id. The disadvantage of an Id is that you can only call an Id as a Selector once per page. On the other hand, you can use a Class endlessly.
Example:
#123 { font-weight: bold}
<p id=”123″>Text bold</p>
Notes from yourself
If you’re setting up a large style sheet for your site, it can be helpful to make notes for yourself. If you’re going to make changes later, these notes can help you see what you meant by your style sheet at the time.
In CSS you display the annotation by placing your comment between /* and */.