Discrete Mathematics for computer science students, Study notes of Discrete Mathematics

This document is one of my 3rd year computer science course.

Typology: Study notes

2020/2021

Uploaded on 04/11/2022

Mila940000
Mila940000 🇪🇹

5

(1)

4 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
pf3
pf4

Partial preview of the text

Download Discrete Mathematics for computer science students and more Study notes Discrete Mathematics in PDF only on Docsity!

Cheatsheets / Learn CSS Syntax and Selectors Link Element The <1link> element is used to link HTML documents to external resources like CSS files. It commonly uses: href attribute to specify the URL to the external resource rel attribute to specify the relationship of the linked document to the current document type attribute to define the type of content being linked Purpose of CSS CSS, or Cascading Style Sheets, is a language that is used in combination with HTML that customizes how HTML elements will appear. CSS can define styles and change the layout and design of a sheet. Write CSS in Separate Files CSS code can be written in its own files to keep it separate from the HTML code. The extension for CSS files is .ess. These can be linked to an HTML file using a taginthe section. Write CSS in HTML File CSS code can be written in an HTML file by enclosing the code in Inline Styles CSS styles can be directly added to HTML elements by using the style attribute in the element's opening tag. Each style declaration is ended with a semicolon. Styles added in this manner are known as inline styles. Separating HTML code from CSS code It is common practice to separate content code in HTML files from styling code in CSS files. This can help make the code easier to maintain, by keeping the syntax for each file separate, and any changes to the content or styling can be made in their respective files. Class and ID Selectors CSS classes can be reusable and applied to many elements. Class selectors are denoted with a period . followed by the class name. CSS ID selectors should be unique and used to style only a single element. ID selectors are denoted with a hash sign # followed by the id name. Groups of CSS Selectors Match multiple selectors to the same CSS rule, using a comma-separated list. In this example, the text for both h1 and h2 is set to red. Selector Chaining CSS selectors define the set of elements to which a CSS rule set applies. For instance, to select all

elements, the p selector can be used to create style rules. codejcademy

/* Selects all elements with class="column" */ -column /* Selects element with id="first-item" */ h1, h2 color: red CSS ID selectors The CSS ID selector matches elements based on the contents of their id attribute. The values of id attribute should be unique in the entire DOM. For font-weight selecting the element having job-title as the value of the id attribute,a # needs to be prepended. CSS descendant selector The CSS descendant selector combinator is used to match elements that are descended from another div p matched selector. They are denoted by a single space between each selector and the descended selector. All section ol li matching elements are selected regardless of the nesting level in the HTML. bold code Icademy