CSS (Cascading Style Sheets) is a style sheet language used to describe the presentation of HTML documents, including how elements should be rendered on screen, on paper, in speech, or on other media. CSS saves time because styles defined in CSS files can be reused across multiple HTML pages. It provides more control over formatting than HTML alone and helps separate a document's content from its presentation. The document then explains various CSS concepts like selectors, properties, syntax, and how to apply styles using internal, external and inline CSS.
CSS allows styling of HTML elements through style rules defined in internal or external style sheets. A style rule has a selector that specifies the element to style and declarations that define the properties and values to apply. External style sheets can control styling across multiple pages by linking the style sheet to each page. Common CSS properties include font, color, size and other text properties that can be applied through class or element selectors to groups of elements.
CSS (Cascading Style Sheets) is used to determine the display and formatting of HTML elements. It separates content from presentation. There are three ways to use CSS - inline styles within HTML elements, internal style sheets within the <head> section, and external style sheets in separate files linked via <link> tags. External style sheets allow consistent formatting across multiple pages by editing one file. Browsers prioritize conflicting styles based on their origin, with inline styles taking highest priority and external styles the lowest.
The document defines CSS (Cascading Style Sheets) and its advantages over HTML. CSS describes how HTML elements are displayed, controls layout, and saves work by allowing styles to be reused across pages. There are three ways to add CSS - inline using the style attribute, internally using the <style> tag, or externally using a separate .css file which is most common. CSS rules have selectors, properties, and values to style elements.
Cascading Style Sheets (CSS) allow control over the appearance of web pages by separating presentation from content. CSS is used to create consistent styles across multiple pages by defining styles that can be applied using classes and IDs. CSS rules define selectors and properties to style HTML elements, and separating styles from HTML structure makes pages easier to maintain and modify. Common CSS selectors include element, class, ID, and contextual selectors. Styles can be linked to HTML using inline, embedded, and external stylesheets.
This document provides an overview of Cascading Style Sheets (CSS) including:
- CSS allows separation of document content from page layout/formatting through external style sheets or internal styles defined in <style> tags.
- CSS has three levels (CSS1, CSS2, CSS3) that add new capabilities. CSS handles properties like fonts, sizes, colors, spacing and positioning of HTML elements.
- Styles can be applied via internal, embedded, or external stylesheets. Inheritance allows CSS rules to apply to child elements. Conflicting styles are resolved through a cascading priority system.
This document provides information about Cascading Style Sheets (CSS), including what CSS is, why it is used, its history and solving problems with early HTML formatting, CSS syntax, selectors, colors, backgrounds, text formatting, and other CSS properties. CSS is used to define styles and layouts for web pages separately from the HTML markup. It allows for controlling formatting and layout across multiple pages simultaneously.
This document provides an overview of styles, themes, and master pages in chapter 8. It discusses styles and CSS, including inline, internal, and external CSS. It defines selectors and declarations. It also covers themes in ASP.NET which provide a centralized way to define a website's appearance. Master pages are mentioned as a way to simplify the use of themes across content pages. Examples are provided of CSS code and using classes to change styles on click events in ASP.NET codebehind files.
This document provides an overview of CSS (Cascading Style Sheets) including definitions, advantages, properties and techniques. It defines CSS as defining how HTML elements are displayed and styles being stored in style sheets. Advantages of CSS include reduced code/page size, easier design/maintenance. Style rules define how to change default element behaviors and have selectors and declarations. External style sheets can apply styles across pages by linking via <LINK>. CSS selection techniques include selecting multiple elements, by context, with classes, <DIV> and <SPAN>. Font properties that can be controlled include family, size, weight, line height and color.
CSS (Cascading Style Sheets) is a stylesheet language used to describe the presentation of a document written in HTML or XML. CSS saves lots of work as formatting elements only need to be applied to one CSS file rather than individually formatting every HTML page. CSS rules consist of selectors that point to the HTML element to style paired with a declaration block containing CSS properties and values to determine how that element will look. Common CSS properties include those to control text formatting, background effects, borders, lists, links and positioning.
This document provides an introduction to CSS (Cascading Style Sheets) including:
- CSS allows separation of document content from design and formatting through stylesheets.
- Stylesheets define how HTML elements are displayed and can be internal, external, or inline.
- Multiple stylesheets and style definitions will cascade together based on specificity.
- The CSS syntax uses selectors to target elements and properties to define styles like colors, fonts, spacing.
- Comments, classes, IDs, and other selectors provide control over styling different elements.
Cascading Style Sheets (CSS) is a style sheet language used to describe the presentation of HTML documents. CSS describes how HTML elements are displayed on screen, paper, or other media. CSS saves work by allowing control of layout and presentation for multiple web pages from one stylesheet file. CSS solves the problem of formatting documents that originally arose from adding font tags and other styling attributes directly into HTML.
The document provides an introduction to CSS (Cascading Style Sheets), explaining what CSS is, how it works, and some basic syntax and concepts. CSS allows separation of document content from document presentation by defining styles that are applied to HTML elements. Styles can be defined internally, in an external CSS file, or inline. The CSS box model is also explained, with the content, padding, border, and margin areas of elements illustrated. Common CSS properties for text formatting are also listed.
CSS (Cascading Style Sheets) allows separation of document content from document presentation by defining styles. CSS can be defined internally, inline, or externally in CSS files. CSS rules have selectors and declarations, where properties and values are used to style elements. Common CSS properties control color, text formatting, background images and colors. Styles can be applied to HTML elements, classes, or IDs. When multiple conflicting styles are defined, styles are cascaded according to precedence rules with inline styles having the highest priority.
This document discusses Dynamic HTML (DHTML) and Cascading Style Sheets (CSS). It defines DHTML as a combination of HTML, JavaScript, DOM and CSS that is used to create dynamic and interactive web pages. CSS is used to define styles and layout for web pages. There are three types of style sheets - inline, internal, and external. Inline style sheets use the style attribute, internal style sheets are defined within <style> tags in the <head> section, and external style sheets are linked via an external .css file. Examples of different CSS selectors and style sheets are also provided.
The document provides an introduction to CSS (Cascading Style Sheets) including the different methods for linking an external CSS stylesheet (internal, external, inline). It describes CSS syntax using selectors, properties, and values to style HTML elements. Specific CSS properties like margins, padding, and classes/IDs are defined. The document is a tutorial that teaches CSS basics through examples to style text formatting, layout, and design elements of a webpage.
The document summarizes Workshop #2 on web development hosted by Sohail Asghar and Saad Mustafa. It covers the basics of HTML, CSS, and JavaScript. For HTML, it discusses basic tags like headings, paragraphs, links, images and lists. For CSS, it explains concepts like selectors, colors, backgrounds, borders, fonts, padding, and margins. For JavaScript, it provides introductions to variables, output, data types, and more.
This document discusses Cascading Style Sheets (CSS). CSS is a style language that specifies layout of HTML documents. It allows separation of page structure (HTML) from page presentation (CSS). CSS offers formatting elements and ability to control layout from a single style sheet. CSS syntax uses selectors to target HTML elements and properties to set values. There are three CSS styles - inline within HTML tags, internal within <style> tags in <head>, and external in a .css file linked via <link> tag.
This document provides an introduction to cascading style sheets (CSS) and covers several key concepts:
CSS is used to style and lay out web pages and defines how HTML elements are displayed. Styles are normally saved in external CSS files so the appearance of an entire website can be changed by editing one file. A CSS rule has a selector that specifies which element the rule applies to and declarations that define properties for that element. Comments can be added to CSS code to explain it. Different selectors like ID, class, and inline styles allow targeting specific elements. The order of style precedence determines which styles get applied when multiple styles conflict. Background properties are used to define and customize element backgrounds.
This document provides an overview of CSS (Cascading Style Sheets) for web development. It defines CSS as a simple design language that separates the structure of HTML elements from their presentation. The document then covers the advantages of CSS, CSS syntax using selectors, properties, and values, examples of inline, embedded, external, and imported CSS, and different types of CSS selectors. It aims to simplify the process of making web pages presentable using CSS.
Cascading Style Sheets (CSS) allow control over the appearance of web pages by separating presentation from content. CSS is used to create consistent styles across multiple pages by defining styles that can be applied using classes and IDs. CSS rules define selectors and properties to style HTML elements, and separating styles from HTML structure makes pages easier to maintain and modify. Common CSS selectors include element, class, ID, and contextual selectors. Styles can be linked to HTML using inline, embedded, and external stylesheets.
This document provides an overview of Cascading Style Sheets (CSS) including:
- CSS allows separation of document content from page layout/formatting through external style sheets or internal styles defined in <style> tags.
- CSS has three levels (CSS1, CSS2, CSS3) that add new capabilities. CSS handles properties like fonts, sizes, colors, spacing and positioning of HTML elements.
- Styles can be applied via internal, embedded, or external stylesheets. Inheritance allows CSS rules to apply to child elements. Conflicting styles are resolved through a cascading priority system.
This document provides information about Cascading Style Sheets (CSS), including what CSS is, why it is used, its history and solving problems with early HTML formatting, CSS syntax, selectors, colors, backgrounds, text formatting, and other CSS properties. CSS is used to define styles and layouts for web pages separately from the HTML markup. It allows for controlling formatting and layout across multiple pages simultaneously.
This document provides an overview of styles, themes, and master pages in chapter 8. It discusses styles and CSS, including inline, internal, and external CSS. It defines selectors and declarations. It also covers themes in ASP.NET which provide a centralized way to define a website's appearance. Master pages are mentioned as a way to simplify the use of themes across content pages. Examples are provided of CSS code and using classes to change styles on click events in ASP.NET codebehind files.
This document provides an overview of CSS (Cascading Style Sheets) including definitions, advantages, properties and techniques. It defines CSS as defining how HTML elements are displayed and styles being stored in style sheets. Advantages of CSS include reduced code/page size, easier design/maintenance. Style rules define how to change default element behaviors and have selectors and declarations. External style sheets can apply styles across pages by linking via <LINK>. CSS selection techniques include selecting multiple elements, by context, with classes, <DIV> and <SPAN>. Font properties that can be controlled include family, size, weight, line height and color.
CSS (Cascading Style Sheets) is a stylesheet language used to describe the presentation of a document written in HTML or XML. CSS saves lots of work as formatting elements only need to be applied to one CSS file rather than individually formatting every HTML page. CSS rules consist of selectors that point to the HTML element to style paired with a declaration block containing CSS properties and values to determine how that element will look. Common CSS properties include those to control text formatting, background effects, borders, lists, links and positioning.
This document provides an introduction to CSS (Cascading Style Sheets) including:
- CSS allows separation of document content from design and formatting through stylesheets.
- Stylesheets define how HTML elements are displayed and can be internal, external, or inline.
- Multiple stylesheets and style definitions will cascade together based on specificity.
- The CSS syntax uses selectors to target elements and properties to define styles like colors, fonts, spacing.
- Comments, classes, IDs, and other selectors provide control over styling different elements.
Cascading Style Sheets (CSS) is a style sheet language used to describe the presentation of HTML documents. CSS describes how HTML elements are displayed on screen, paper, or other media. CSS saves work by allowing control of layout and presentation for multiple web pages from one stylesheet file. CSS solves the problem of formatting documents that originally arose from adding font tags and other styling attributes directly into HTML.
The document provides an introduction to CSS (Cascading Style Sheets), explaining what CSS is, how it works, and some basic syntax and concepts. CSS allows separation of document content from document presentation by defining styles that are applied to HTML elements. Styles can be defined internally, in an external CSS file, or inline. The CSS box model is also explained, with the content, padding, border, and margin areas of elements illustrated. Common CSS properties for text formatting are also listed.
CSS (Cascading Style Sheets) allows separation of document content from document presentation by defining styles. CSS can be defined internally, inline, or externally in CSS files. CSS rules have selectors and declarations, where properties and values are used to style elements. Common CSS properties control color, text formatting, background images and colors. Styles can be applied to HTML elements, classes, or IDs. When multiple conflicting styles are defined, styles are cascaded according to precedence rules with inline styles having the highest priority.
This document discusses Dynamic HTML (DHTML) and Cascading Style Sheets (CSS). It defines DHTML as a combination of HTML, JavaScript, DOM and CSS that is used to create dynamic and interactive web pages. CSS is used to define styles and layout for web pages. There are three types of style sheets - inline, internal, and external. Inline style sheets use the style attribute, internal style sheets are defined within <style> tags in the <head> section, and external style sheets are linked via an external .css file. Examples of different CSS selectors and style sheets are also provided.
The document provides an introduction to CSS (Cascading Style Sheets) including the different methods for linking an external CSS stylesheet (internal, external, inline). It describes CSS syntax using selectors, properties, and values to style HTML elements. Specific CSS properties like margins, padding, and classes/IDs are defined. The document is a tutorial that teaches CSS basics through examples to style text formatting, layout, and design elements of a webpage.
The document summarizes Workshop #2 on web development hosted by Sohail Asghar and Saad Mustafa. It covers the basics of HTML, CSS, and JavaScript. For HTML, it discusses basic tags like headings, paragraphs, links, images and lists. For CSS, it explains concepts like selectors, colors, backgrounds, borders, fonts, padding, and margins. For JavaScript, it provides introductions to variables, output, data types, and more.
This document discusses Cascading Style Sheets (CSS). CSS is a style language that specifies layout of HTML documents. It allows separation of page structure (HTML) from page presentation (CSS). CSS offers formatting elements and ability to control layout from a single style sheet. CSS syntax uses selectors to target HTML elements and properties to set values. There are three CSS styles - inline within HTML tags, internal within <style> tags in <head>, and external in a .css file linked via <link> tag.
This document provides an introduction to cascading style sheets (CSS) and covers several key concepts:
CSS is used to style and lay out web pages and defines how HTML elements are displayed. Styles are normally saved in external CSS files so the appearance of an entire website can be changed by editing one file. A CSS rule has a selector that specifies which element the rule applies to and declarations that define properties for that element. Comments can be added to CSS code to explain it. Different selectors like ID, class, and inline styles allow targeting specific elements. The order of style precedence determines which styles get applied when multiple styles conflict. Background properties are used to define and customize element backgrounds.
This document provides an overview of CSS (Cascading Style Sheets) for web development. It defines CSS as a simple design language that separates the structure of HTML elements from their presentation. The document then covers the advantages of CSS, CSS syntax using selectors, properties, and values, examples of inline, embedded, external, and imported CSS, and different types of CSS selectors. It aims to simplify the process of making web pages presentable using CSS.
Unit 2 discusses different programming paradigms including structured and unstructured programming. Structured programming divides code into modular functions making it easier to test, debug and modify, while unstructured programming writes code in a single block. Common structured programming languages include C and Pascal.
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptxSherinRappai
The document discusses computing, programming, algorithms, and program development life cycle. It provides definitions and explanations of key concepts:
1. A program is a set of instructions that tells a computer how to perform tasks, written in a programming language. Programs range from simple scripts to complex applications.
2. Algorithms are step-by-step procedures for solving problems or performing tasks. They are incorporated into programs.
3. The program development life cycle includes phases like analysis, design, coding, testing, and maintenance to systematically create reliable programs. Diagramming tools like pseudocode, flowcharts, and UML diagrams are used in the design process.
- The document discusses various clustering techniques used in unsupervised machine learning. It describes partitioning methods like k-means and k-medoids, hierarchical methods like agglomerative and divisive clustering, and density-based methods like DBSCAN. It also covers choosing the number of clusters and interpreting clustering results. Clustering is used in applications such as customer segmentation, anomaly detection, and data simplification.
This document discusses artificial neural networks. It defines neural networks as computational models inspired by the human brain that are used for tasks like classification, clustering, and pattern recognition. The key points are:
- Neural networks contain interconnected artificial neurons that can perform complex computations. They are inspired by biological neurons in the brain.
- Common neural network types are feedforward networks, where data flows from input to output, and recurrent networks, which contain feedback loops.
- Neural networks are trained using algorithms like backpropagation that minimize error by adjusting synaptic weights between neurons.
- Neural networks have various applications including voice recognition, image recognition, and robotics due to their ability to learn from large amounts of data.
This document discusses rendering algorithms and techniques. It begins by defining rendering as the process of generating 2D or 3D images from 3D models. There are two main categories of rendering: real-time rendering used for interactive graphics, and pre-rendering used where image quality is prioritized over speed. The three main computational techniques are ray casting, ray tracing, and shading. Ray tracing simulates physically accurate lighting by tracing the path of light rays. Shading determines an object's shade based on attributes like diffuse illumination and light source contributions.
Semantic Cultivators : The Critical Future Role to Enable AIartmondano
By 2026, AI agents will consume 10x more enterprise data than humans, but with none of the contextual understanding that prevents catastrophic misinterpretations.
Ai voice agent for customer care | PPT | PresentationCodiste
AI Voice Agents are sophisticated software systems leveraging artificial intelligence for voice-based customer interactions. They provide automated yet personalized service solutions.
These systems offer 24/7 support, reduce costs by 30-50%, and handle up to 85% of customer interactions without human intervention.
Read more information: https://bit.ly/4lRE1JS
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc
Most consumers believe they’re making informed decisions about their personal data—adjusting privacy settings, blocking trackers, and opting out where they can. However, our new research reveals that while awareness is high, taking meaningful action is still lacking. On the corporate side, many organizations report strong policies for managing third-party data and consumer consent yet fall short when it comes to consistency, accountability and transparency.
This session will explore the research findings from TrustArc’s Privacy Pulse Survey, examining consumer attitudes toward personal data collection and practical suggestions for corporate practices around purchasing third-party data.
Attendees will learn:
- Consumer awareness around data brokers and what consumers are doing to limit data collection
- How businesses assess third-party vendors and their consent management operations
- Where business preparedness needs improvement
- What these trends mean for the future of privacy governance and public trust
This discussion is essential for privacy, risk, and compliance professionals who want to ground their strategies in current data and prepare for what’s next in the privacy landscape.
AI and Data Privacy in 2025: Global TrendsInData Labs
In this infographic, we explore how businesses can implement effective governance frameworks to address AI data privacy. Understanding it is crucial for developing effective strategies that ensure compliance, safeguard customer trust, and leverage AI responsibly. Equip yourself with insights that can drive informed decision-making and position your organization for success in the future of data privacy.
This infographic contains:
-AI and data privacy: Key findings
-Statistics on AI data privacy in the today’s world
-Tips on how to overcome data privacy challenges
-Benefits of AI data security investments.
Keep up-to-date on how AI is reshaping privacy standards and what this entails for both individuals and organizations.
This is the keynote of the Into the Box conference, highlighting the release of the BoxLang JVM language, its key enhancements, and its vision for the future.
At Kualitatem, our Cybersecurity Risk Assessment is designed to uncover vulnerabilities before attackers do. We evaluate your IT infrastructure, applications, and operations to identify weak points that may expose your business to threats. With our thorough assessment process, we help organizations understand their risk posture and take timely, informed action. We align with global standards to deliver a clear picture of your security gaps and offer tailored mitigation strategies. This proactive approach enhances your resilience and prepares you to defend against modern cyber threats effectively and confidently.
Technology Trends in 2025: AI and Big Data AnalyticsInData Labs
At InData Labs, we have been keeping an ear to the ground, looking out for AI-enabled digital transformation trends coming our way in 2025. Our report will provide a look into the technology landscape of the future, including:
-Artificial Intelligence Market Overview
-Strategies for AI Adoption in 2025
-Anticipated drivers of AI adoption and transformative technologies
-Benefits of AI and Big data for your business
-Tips on how to prepare your business for innovation
-AI and data privacy: Strategies for securing data privacy in AI models, etc.
Download your free copy nowand implement the key findings to improve your business.
Buckeye Dreamin 2024: Assessing and Resolving Technical DebtLynda Kane
Slide Deck from Buckeye Dreamin' 2024 presentation Assessing and Resolving Technical Debt. Focused on identifying technical debt in Salesforce and working towards resolving it.
"Client Partnership — the Path to Exponential Growth for Companies Sized 50-5...Fwdays
Why the "more leads, more sales" approach is not a silver bullet for a company.
Common symptoms of an ineffective Client Partnership (CP).
Key reasons why CP fails.
Step-by-step roadmap for building this function (processes, roles, metrics).
Business outcomes of CP implementation based on examples of companies sized 50-500.
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul
Artificial intelligence is changing how businesses operate. Companies are using AI agents to automate tasks, reduce time spent on repetitive work, and focus more on high-value activities. Noah Loul, an AI strategist and entrepreneur, has helped dozens of companies streamline their operations using smart automation. He believes AI agents aren't just tools—they're workers that take on repeatable tasks so your human team can focus on what matters. If you want to reduce time waste and increase output, AI agents are the next move.
Mobile App Development Company in Saudi ArabiaSteve Jonas
EmizenTech is a globally recognized software development company, proudly serving businesses since 2013. With over 11+ years of industry experience and a team of 200+ skilled professionals, we have successfully delivered 1200+ projects across various sectors. As a leading Mobile App Development Company In Saudi Arabia we offer end-to-end solutions for iOS, Android, and cross-platform applications. Our apps are known for their user-friendly interfaces, scalability, high performance, and strong security features. We tailor each mobile application to meet the unique needs of different industries, ensuring a seamless user experience. EmizenTech is committed to turning your vision into a powerful digital product that drives growth, innovation, and long-term success in the competitive mobile landscape of Saudi Arabia.
Hands On: Create a Lightning Aura Component with force:RecordDataLynda Kane
Slide Deck from the 3/26/2020 virtual meeting of the Cleveland Developer Group presentation on creating a Lightning Aura Component using force:RecordData.
2. Cascading Style Sheets, fondly referred to as CSS, is a
simple design language intended to simplify the
process of making web pages presentable.
CSS handles the look and feel part of a web page.
Using CSS, can control the color of the text, the style
of fonts, the spacing between paragraphs, how columns
are sized and laid out, what background images or
colors are used, layout designs, variations in display for
different devices and screen sizes as well as a variety of
other effects.
Introduction CSS
3. CSS saves time – We can write CSS once and then reuse
same sheet in multiple HTML pages. You can define a
style for each HTML element and apply it to as many Web
pages as you want.
Pages load faster − If you are using CSS, you do not need
to write HTML tag attributes every time. Just write one
CSS rule of a tag and apply it to all the occurrences of that
tag. So less code means faster download times.
Easy maintenance − To make a global change, simply
change the style, and all elements in all the web pages will
be updated automatically.
Advantages of CSS
4. Superior styles to HTML − CSS has a much wider
array of attributes than HTML, so you can give a far
better look to your HTML page in comparison to
HTML attributes.
Global web standards − Now HTML attributes are
being deprecated and it is being recommended to use
CSS. So its a good idea to start using CSS in all the
HTML pages to make them compatible to future
browsers.
5. CSS is created and maintained through a group of
people within the W3C called the CSS Working Group.
The CSS Working Group creates documents called
specifications.
When a specification has been discussed and officially
ratified by the W3C members, it becomes a
recommendation.
Who Creates and Maintains CSS?
6. A CSS comprises of style rules that are interpreted by the
browser and then applied to the corresponding elements in
your document. A style rule is made of three parts −
Selector − A selector is an HTML tag at which a style will
be applied. This could be any tag like <h1> or <table> etc.
Property − A property is a type of attribute of HTML tag.
Put simply, all the HTML attributes are converted into
CSS properties. They could be color, border etc.
Value − Values are assigned to properties. For example,
color property can have value either red or #F1F1F1 etc.
CSS - Syntax
7. What is CSS?
CSS stands for Cascading Style Sheets
CSS describes how HTML elements are to be
displayed on screen, paper, or in other media
CSS saves a lot of work. It can control the layout
of multiple web pages all at once
External stylesheets are stored in CSS files
8. Why Use CSS?
CSS is used to define styles for your web pages,
including the design, layout and variations in
display for different devices and screen sizes.
10. CSS Style Rule Syntax as follows −
selector { property: value }
Example − table border as follows
table{ border :1px solid #C00; }
Here table is a selector and border is a property and given value 1px solid
#C00 is the value of that property.
13. Cascading Style Sheet(CSS) is used to set the style in
web pages that contain HTML elements.
It sets the background color, font-size, font-family, color,
etc property of elements on a web page.
There are three types of CSS which are given below:
Inline CSS
Internal or Embedded CSS
External CSS
CSS styling
14. Inline CSS:
Inline CSS contains the CSS property in the body
section attached with element is known as inline CSS.
This kind of style is specified within an HTML tag
using the style attribute.
Inline styles are defined within the "style" attribute of
the relevant element:
15. <html>
<body>
<h1 style="color: navy; margin-left: 20px;">Hello, World!</h1>
<p style="font-size: 16px; color: darkgreen; background-color:
lightyellow;">
This is a paragraph styled with inline CSS.
</p>
</body>
</html>
16. Advantages of Inline CSS:
You can easily and quickly insert CSS rules to an
HTML page. That’s why this method is useful for
testing or previewing the changes, and performing
quick-fixes to your website.
You don’t need to create and upload a separate
document as in the external style.
17. Disadvantages of Inline CSS:
Adding CSS rules to every HTML element is time-
consuming and makes your HTML structure messy.
Styling multiple elements can affect your page’s size
and download time.
18. An internal style sheet may be used if one single
HTML page has a unique style.
The internal style is defined inside the <style> element,
inside the head section.
Example
Internal styles are defined within the <style> element,
inside the <head> section of an HTML page:
Internal CSS
19. <html>
<head>
<style>
body {
background-color: lightblue;
}
h1 {
color: navy;
margin-left: 20px;
}
p {
font-size: 16px;
color: darkgreen;
background-color: lightyellow;
}
</style>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
21. With an external style sheet, you can change the look
of an entire website by changing just one file!
Each HTML page must include a reference to the
external style sheet file inside the <link> element,
inside the head section.
Example
External styles are defined within the <link> element,
inside the <head> section of an HTML page:
External CSS
22. <html>
<head>
<title>External CSS Example</title>
<link rel="stylesheet" href="styles1.css">
</head>
<body>
<h1>Welcome to My Page</h1>
<p>This is a paragraph styled with external CSS.</p>
<button>Click Me</button>
</body>
</html>
24. The following text properties of an element −
The color property is used to set the color of a text.
The direction property is used to set the text
direction.
The letter-spacing property is used to add or
subtract space between the letters that make up a
word.
The word-spacing property is used to add or
subtract space between the words of a sentence.
Controlling text and text formatting
25. The text-align property is used to align the text of a
document.
The text-decoration property is used to underline,
overline, and strikethrough text.
The text-transform property is used to capitalize text
or convert text to uppercase or lowercase letters
27. .text-example {
color: blue; /* Sets the text color to blue */
direction: rtl; /* Sets the text direction to right-to-left */
letter-spacing: 2px; /* Adds 2px space between each letter
*/
word-spacing: 5px; /* Adds 5px space between each word */
text-align: center; /* Aligns the text to the center of the
container */
text-decoration: underline; /* Underlines the text */
text-transform: uppercase; /* Converts all the text to
uppercase letters */
}
Styles.css
28. CSS selectors are used to select the content you want
to style.
Selectors are the part of CSS rule set.
CSS selectors select HTML elements according to its
id, class, type, attribute etc.
CSS Selectors
29. There are several different types of selectors in CSS.
1. CSS Element Selector
2. CSS Id Selector
3. CSS Class Selector
4. CSS Universal Selector
5. CSS Group Selector
30. 1. CSS Element Selector
The element selector selects HTML elements based on
the element name.
32. 2. CSS Id Selector
The id selector selects the id attribute of an HTML
element to select a specific element.
An id is always unique within the page so it is chosen
to select a single, unique element.
It is written with the hash character (#), followed by the
id of the element.
34. 3. CSS Class Selector
The class selector selects HTML elements with a
specific class attribute. It is used with a period
character . (full stop symbol) followed by the class
name.
The class selector is used to apply styles to multiple
elements. You can assign the same class to as many
elements as you want.
36. 4. CSS Universal Selector
The universal selector (*) selects all HTML elements
on the page.
The CSS universal selector is a powerful tool that
applies styles to every element on a webpage.
When you use the universal selector, it targets all
elements in the document, allowing you to apply global
styles with a single rule.
37. <html>
<head>
<style>
* {
text-align: center;
color: blue;
}
</style>
</head>
<body>
<h1>Hello world!</h1>
<p>Every element on the page will be affected by the style.</p>
<p id="para1">Me too!</p>
<p>And me!</p>
</body>
</html>
38. 5. CSS Grouping Selector
The grouping selector selects all the HTML elements with the same
style definitions.
h1 {
text-align: center;
color: red;
}
h2 {
text-align: center;
color: red;
}
p {
text-align: center;
color: red;
}
39. It will be better to group the selectors, to minimize the
code.
To group selectors, separate each selector with a
comma.
h1, h2, p {
text-align: center;
color: red;
}
40. <html>
<head>
<style>
h1, h2, p {
text-align: center;
color: red;
}
</style>
</head>
<body>
<h1>Hello World!</h1>
<h2>Smaller heading!</h2>
<p>This is a paragraph.</p>
</body>
</html>
41. CSS box model is a container which contains multiple
properties including borders, margin, padding and the
content itself.
It is used to create the design and layout of web pages.
It can be used as a toolkit for customizing the layout of
different elements.
Box-Model has multiple properties in CSS. Some of
them are given below:
The CSS Box Model
43. The box model allows us to add a border around
elements, and to define space between elements.
44. Border Area: It is the area between the box’s padding
and margin. Its dimensions are given by the width and
height of border.
Margin Area: This area consists of space between
border and margin. The dimensions of Margin area are
the margin-box width and the margin-box height. It is
useful to separate the element from its neighbors.
45. Padding Area: It includes the element’s padding. This
area is actually the space around the content area and
within the border box. Its dimensions are given by the
width of the padding-box and the height of the
padding-box.
Content Area: This area consists of content like text,
image, or other media content. It is bounded by the
content edge and its dimensions are given by content
box width and height.
46. Table Borders
To specify table borders in CSS, use the border
property.
The example below specifies a black border for
<table>, <th>, and <td> elements:
Tables in CSS
51. Width and height of a table are defined by the width
and height properties.
The example below sets the width of the table to 100%,
and the height of the <th> elements to 50px:
Table Width and Height
53. </head>
<body>
<h2>The width and height Properties</h2>
<p>Set the width of the table, and the height of the table header
row:</p>
<table>
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Savings</th>
</tr>
57. A navigation bar needs standard HTML as a
base.
In our examples we will build the navigation
bar from a standard HTML list.
A navigation bar is basically a list of links, so
using the <ul> and <li> elements makes perfect
sense:
Navigation Bar = List of Links
58. <!DOCTYPE html>
<html>
<head>
<style>
ul {
list-style-type: none;
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<p>In this example, we remove the bullets from the list, and its default padding and
margin.</p>
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#news">News</a></li>
<li><a href="#contact">Contact</a></li>
<li><a href="about.html">About</a></li>
</ul>
</body>
</html>
59. <html>
<head>
<style>
ul {
list-style-type: none;
margin: 0;
padding: 0;
width: 200px;
background-color: #f1f1f1;
}
li a {
display: block;
color: #000;
padding: 8px 16px;
text-decoration: none;
}
/* Change the link color on hover */
li a:hover {
background-color: #555;
color: white;
}
</style>
Vertical Navigation Bar
</head>
<body>
<h2>Vertical Navigation Bar</h2>
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#news">News</a></li>
<li><a href="#contact">Contact</a></li>
<li><a href="#about">About</a></li>
</ul>
</body>
</html>
62. Header
A header is usually located at the top of the website
(or right below a top navigation menu). It often
contains a logo or the website name
.header {
background-color: #F1F1F1;
text-align: center;
padding: 20px;
}
64. Navigation Bar
A navigation bar contains a list of links to help visitors
navigating through your website:
/* The navbar container */
.topnav {
overflow: hidden;
background-color: #333;
}
66. Content
The layout in this section, often depends on the target users. The
most common layout is one (or combining them) of the following:
1-column (often used for mobile browsers)
2-column (often used for tablets and laptops)
3-column layout (only used for desktops)
.column {
float: left;
width: 33.33%;
}
67. Footer
The footer is placed at the bottom of your page. It often
contains information like copyright and contact info:
Example
.footer {
background-color: #F1F1F1;
text-align: center;
padding: 10px;
}
69. The border-style property specifies what kind of border to display.
The following values are allowed:
dotted - Defines a dotted border
dashed - Defines a dashed border
solid - Defines a solid border
double - Defines a double border
groove - Defines a 3D grooved border. The effect depends on the border-color
value
ridge - Defines a 3D ridged border. The effect depends on the border-color
value
inset - Defines a 3D inset border. The effect depends on the border-color
value
outset - Defines a 3D outset border. The effect depends on the border-color
value
none - Defines no border
hidden - Defines a hidden border
The border-style property can have from one to four values (for the top
border, right border, bottom border, and the left border).
CSS Borders
70. <!DOCTYPE html>
<html>
<head>
<style>
div {
border: 1px solid black;
background-color: lightblue;
padding-top: 50px;
padding-right: 30px;
padding-bottom: 50px;
padding-left: 80px;
}
</style>
</head>
<body>
<h2>Using individual padding properties</h2>
<div>This div element has a top padding of 50px, a right padding of 30px, a bottom padding of
50px, and a left padding of 80px.</div>
</body>
</html>
CSS Padding
71. <!DOCTYPE html>
<html>
<head>
<style>
div {
border: 1px solid black;
padding: 25px 50px 75px 100px;
background-color: lightblue;
}
</style>
</head>
<body>
<h2>The padding shorthand property - 4 values</h2>
<div>This div element has a top padding of 25px, a right padding of 50px, a bottom padding of
75px, and a left padding of 100px.</div>
</body>
</html>
Padding short hand
Editor's Notes
#60: The overflow property specifies what should happen if content overflows an element's box.
Hidden : The overflow is clipped, and the rest of the content will be invisible. Content can be scrolled programmatically (e.g. by setting scrollLeft or scrollTo())
The overflow property has the following values:
visible - Default. The overflow is not clipped. The content renders outside the element's box
hidden - The overflow is clipped, and the rest of the content will be invisible
scroll - The overflow is clipped, and a scrollbar is added to see the rest of the content
auto - Similar to scroll, but it adds scrollbars only when necessary