Unformatted text preview:

CSS Introduction and Tutorial for Beginners TOPIC 1 Introduction to CSS and HTML Basics 2 Differences Between HTML and CSS 3 Web Development Prerequisites 4 Tools and Platforms for Website Development 5 Creating a New Project Folder 6 Understanding External Internal and Inline CSS 7 CSS Rules and Declarations CSS Rules and Declarations CSS Cascading Style Sheets is a style sheet language used for describing the look and formatting of a document written in HTML It is a cornerstone technology of the World Wide Web alongside HTML and JavaScript CSS Rules 1 CSS rules are made up of two parts the selector and the declaration 2 The selector is a pattern that identifies the HTML element that the rule applies to 3 The declaration contains the properties and their values that will be applied to the selected element s Declaration Blocks and Properties 1 A declaration block is a list of individual declarations each separated by a semi colon 2 Each declaration includes a property name and a value For example color red font size 14px p In this example the selector p targets all paragraph elements The declaration block includes two declarations color red and font size 14px CSS Selector There are several types of CSS selectors including 1 Element selectors select elements based on their HTML tag name e g p div span 2 Class selectors select elements based on their class attribute e g my class 3 ID selectors select a single element based on its ID attribute e g my id Creating a New Project Folder 1 When starting a new web development project it s a good practice to create a new project folder to keep all of your project files organized 2 Create a new folder on your computer to serve as the project root 3 Inside the project root create subfolders for different types of files e g css js images 4 Store all of your project s HTML CSS and JavaScript files inside these subfolders for easy organization and access CSS Cascading Style Sheets is a styling language that is used to control the layout and appearance of web pages It is used in conjunction with HTML to add visual flair to web pages Here are some fundamental concepts related to CSS Color Contrast and Checkers Color contrast is an important consideration when designing websites It ensures that the text on a web page is easily readable against its background Checkers is a tool that helps to check the contrast ratio between two colors Color Theory and HSL Color theory is a concept that deals with the mixture of colors to create new colors HSL Hue Saturation Lightness is a color model that represents colors as a combination of these three attributes CSS Display Flex and Grid Flex and grid are two display properties in CSS that help to control the layout of web pages Flex is used for one dimensional layouts while grid is used for two dimensional layouts Picking Colors in CSS CSS offers various ways to pick colors for web pages This includes color names RGB RGBA Hex and HSL Static vs Relative Positioning In CSS there are two types of positioning static and relative Static positioning is the default positioning where elements are positioned in the normal flow Relative positioning allows elements to be positioned relative to their normal position Z Index in Positioned Elements Z index is a property that controls the stacking order of positioned elements It determines which element appears on top of another Importance of Families Generic Font Generic font families are a fallback mechanism in CSS that ensures that a web page displays text even if the specified font is not available Using Google Fonts in CSS Google Fonts is a library of open source fonts that can be used in CSS It offers a wide variety of fonts that can be easily integrated into web pages Styling Hyperlinks with CSS CSS can be used to style hyperlinks This includes changing the color font and underline of hyperlinks Pseudo Classes and Link States Pseudo classes and link states are used to style hyperlinks based on their state e g visited hover active Using Shorthand for Margin and Padding CSS offers shorthand properties for margin and padding This allows for more concise and efficient styling Applying Box Model Principles to Containers and Elements The box model is a fundamental concept in CSS that deals with the layout of elements on a web page It includes the content padding border and margin of an element List Styling Customizing Ordered and Unordered Lists CSS can be used to customize the appearance of ordered and unordered lists This includes changing the bullet points list styles and indentation CSS Display Property The CSS display property is used to control the layout and visibility of elements It includes values such as block inline and none Inline Elements Inline elements are elements that do not start on a new line and only take up as much width as necessary Inline block Elements Inline block elements are elements that behave like inline elements but can have a defined width and height Unordered List Styling Unordered lists can be styled in CSS using the list style type property This includes changing the bullet point type and color Pseudo Selectors Pseudo selectors are used to select elements based on their state or position in the document CSS Inheritance CSS inheritance is the process where property values are passed down from parent elements to child elements CSS Float Property The CSS float property is used to move elements to the left or right of the page and allow text to wrap around them CSS Columns Property The CSS columns property is used to create multi column layouts CSS Units Absolute Relative and Special CSS units can be absolute fixed size relative size relative to another element or special e g em rem vw vh CSS Padding Margin and Border Padding margin and border are properties that define the space around and inside an element Default Browser Styles Every browser has a set of default styles that are applied to HTML elements CSS Reset CSS reset is the process of resetting all default browser styles to a known baseline Fixed vs Sticky Positioning Understanding the Differences Fixed positioning positions an element relative to the browser window while sticky positioning positions an element relative to its nearest scrolling parent Anatomy of a CSS Rule Set A CSS rule set includes a selector and a set of properties and values Styling Type Changing Colors and Transparency CSS can be used to change the color and transparency of text CSS Position Z Index and Stacking

View Full Document

CSU Global COM 423 - CSS Introduction and Tutorial for Beginners

Download CSS Introduction and Tutorial for Beginners
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...

Join to view CSS Introduction and Tutorial for Beginners and access 3M+ class-specific study document.

We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view CSS Introduction and Tutorial for Beginners and access 3M+ class-specific study document.


By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?