Basics Of Css
What is CSS ?
CSS (Cascading style sheets)is a simply designed language intended to simplify the process of making web pages presentable. CSS allows you to apply styles to HTML documents. It describes how a webpage should look. It prescribes colors, fonts, spacing, etc. In short, you can make your website look however you want. CSS lets developers and designers define how it behaves, including how elements are positioned in the browser.
HTML uses tags and CSS uses rulesets. CSS styles are applied to the HTML element using selectors. CSS is easy to learn and understand, but it provides powerful control over the presentation of an HTML document.
The History Of CSS :
CSS was first proposed by Håkon Wium Lie in 1994 and later developed by Lie and Bert Bos, who published the CSS1 specification in 1996.
The reason for using CSS is to simplify the process of making web pages presentable.
CSS allows web developers to control the visual appearance of web pages.
Types of CSS :
CSS has 3 ways to style your HTML:
Inline CSS : Inline CSS contains the CSS property in the body section attached to the element.
Internal or Embedded CSS: The CSS ruleset should be within the HTML file in the head section i.e. the CSS is embedded within the HTML file.
External CSS: External CSS contains a separate CSS file that contains only style properties with the help of tag attributes.
CSS Frameworks :
CSS frameworks are pre-prepared libraries of CSS code and sometimes JavaScript, designed to simplify and expedite the process of web development.
These CSS frameworks provide a set of standardized, reusable components and a predefined structure, allowing developers to create responsive and aesthetically pleasing websites with reduced effort.
Features of CSS :
Here are some key features of CSS:
CSS specifies how HTML elements should be displayed on screens.
The Major key feature of CSS includes styling rules which are interpreted by the client browser and applied to various elements.
Using CSS, you can control the color text, the style of fonts, spacing between elements, how columns are sized, variation in display for different devices and screen size as well as a variety of other effects.
CSS LIST :
The List in CSS specifies the listing of the contents or items in a particular manner i.e., it can either be organized orderly or under way, which helps to make a clean webpage. It can be used to arrange the huge with a variety of content as they are flexible and easy to manage. The default style for the list is borderless.
The list can be categorized into 2 types:
Unordered List: In unordered lists, the list items are marked with bullets i.e. small black circles by default.
Ordered List: In ordered lists, the list items are marked with numbers and an alphabet.
CSS Tables :
A table in CSS is used to apply the various styling properties to the HTML Table elements to arrange the data in rows and columns, or possibly in a more complex structure in a properly organized manner. Tables are widely used in communication, research, and data analysis. The table-layout property in CSS can be utilized to display the layout of the table. This property is basically used to sets the algorithm that is used to layout <table>cells, rows, and columns.
Properties:
Border: It is used for specifying borders in the table.
CSS Syntax :
CSS comprises style rules that are interpreted by the browser and then applied to the corresponding elements in your document. A style rule set consists of a selector and declaration block.
Selector: A selector in CSS is used to target and select specific HTML elements to apply styles.
Declaration: A declaration in CSS is a combination of a property and its corresponding value.
The selector points to the HTML element that you want to style.
The declaration block contains one or more declarations separated by semicolons.
Each declaration includes a CSS property name and a value, separated by a colon.
code :
p {
color: blue;
text-align: center;
}
CSS declaration always ends with a semicolon, and declaration blocks are surrounded by curly braces. In this example, all paragraph element (<p> tag) will be center-aligned, with a blue text color.
Basics on Git and GitHub :
Git is an application which is used for version control. Git is a centralized version control system.
Git keeps track of all your versions, changes and updates.
Git will contain three phases. They are as follows:-
(i)Working Phase/Working Area
(ii)Staging Phase/Staging Area
(iii)Local Repository
- GitHub is a platform created by Microsoft where developers share, deploy and merge codes.
How to Push codes into GitHub :
Create an account on GitHub.
* Then go to new and create a new repository.
* Then open the folder which you want to push into the GitHub.
* After that open terminal and there is an option that is new terminal click on that and remember it will be in cmd mode not in power shell.
* Then run the following commands:-
(i)git init
(iii)git commit -m "any text"
(iv)git branch -M main
(v)git remote set -URL origin https link
(vi)git push -u origin main