Cascading Styling Sheets(CSS) simple design language intended to transform the presentation of a Web Pages as well as many ostensibly non web environments
1.Inline CSS
2. Internal
3.External
Inline CSS:Inline CSS contains the CSSproperty in the body section attached to the element is known as inline CSS. This kind of style is specified within an HTML tag using the style attribute.
<html>
<head>
<title>Inline CSS</title>
</head>
<body>
<p style="color:#009900; font-size:50px;
font-style:italic; text-align:center;">
Nesamony Memorial Christian College
</p>
</body>
</html>
Internal or Embedded CSS:This can be used when a single HTML document must be styled uniquely. TheCSSrule set should be within theHTMLfile in the head section i.e. theCSSis embedded within the <style> tag inside the head section of theHTMLfile.
<html>
<head>
<title>Internal CSS</title>
<style>
.main {
text-align: center;
}
.mca {
color: #009900;
font-size: 50px;
font-weight: bold;
}
.nmcc {
font-style: bold;
font-size: 20px;
}
</style>
</head>
External CSS:External CSS contains separateCSSfiles that contain only style properties with the help of tag attributes (For example class, id, heading, … etc).
CSSproperty is written in a separate file with a .css extension and should be linked to theHTMLdocument using alinktag. It means that, for each element, style can be set only once and will be applied across web pages.
<html>
<head>
<link rel="stylesheet" href="geeks.css" />
</head>
<body>
<div class="main">
<div class=“mca">Department of Computer Science & Applications</div>
<div id=“nmcc">
Basics of Web Design
</div>
</div>
</body>
</html>
Cascading Style Sheets for web browser.pptxalvindalejoyosa1CSS (Cascading Style Sheets) allows control over how HTML elements are displayed on different media. CSS saves work by allowing global control of layout and styles across multiple web pages from a single stylesheet. It provides advantages like faster page loads, easy maintenance through global changes, superior styling capabilities, and compatibility across devices. CSS is created and maintained by the W3C consortium and browser vendors implement CSS specifications. Styles are applied using selectors that target elements by name, id, class, and other attributes. Styles can be defined internally, in external style sheets, or inline in elements.
CssAbhishek KesharwaniCSS (Cascading Style Sheets) is a style sheet language that allows control over the look and formatting of a document written in a markup language like HTML. CSS handles the styling and layout of web pages and allows separation of content from design. Key points covered in the document include that CSS can control colors, fonts, layout, backgrounds and other styling aspects. It provides advantages like time savings, easier maintenance, faster page loads and global standards compliance. CSS rules are created and maintained by the W3C and different versions have been released over time. CSS syntax involves selectors, properties and values to target elements and apply styles. Styles can be defined inline, internally, or via external stylesheets.
uptu web technology unit 2 CssAbhishek KesharwaniCSS is a style sheet language used to describe the presentation of web pages including colors, fonts, layout, etc. It allows separation of document content from document presentation for better content organization and maintenance. CSS rules are made up of selectors, properties, and values and can be defined within HTML, externally, or via internal stylesheets. Common CSS properties include font, color, background, text, box model, list, table, and positioning. CSS specifications are developed and maintained by the W3C to standardize web development.
WEB TECHNOLOGY Unit-2.pptxkarthiksmart21The document provides information on client-side programming and CSS. It defines client-side programming as code that runs in the browser and deals with the user interface. Some key points made about CSS include:
- CSS stands for Cascading Style Sheets and describes how HTML elements are displayed.
- There are three ways to insert CSS - external, internal, and inline stylesheets. CSS selectors are used to target specific elements for styling.
- The document discusses various CSS properties including colors, backgrounds, and adding background images. Color values can be defined using hexadecimal, RGB, and other notation.
Web Development - Lecture 5Syed Shahzaib SohailThis document provides an introduction to CSS (Cascading Style Sheets). It defines CSS, explains why it is used, and describes the different ways to implement CSS styles including inline, internal, and external stylesheets. It also covers important CSS concepts like the syntax, selectors, grouping selectors, and comments. CSS is used to control the presentation and layout of HTML elements, separate styling from content, and allow styling to be applied across multiple pages from one stylesheet file.
Cascading style sheet an introductionHimanshu PathakThis document introduces Cascading Style Sheets (CSS) and discusses its syntax, selectors, and different types including inline CSS, internal CSS, and external CSS. CSS is used to style web pages and control layout, and has benefits like easier maintenance and faster page loads. CSS syntax uses selectors to point to HTML elements and properties to define styles. The three types are inline CSS using the style attribute, internal CSS within <style> tags in the head, and external CSS linking to a separate .css file.
Css.htmlAnaghabalakrishnanThis document provides an introduction and overview of Cascading Style Sheets (CSS). It defines CSS as used to format and style web pages, describes the advantages of using CSS including simplifying design changes and creating style sheets for different audiences. It then explains the basic syntax of CSS using examples and describes the three types of CSS styles: internal, inline, and external styles. Finally, it outlines different CSS selectors including element, id, and class selectors and provides an example of how to use CSS to style an HTML table.
Howcssworks 100207024009-phpapp01Likitha47This document provides an overview of CSS (Cascading Style Sheets), including what CSS is, how it separates presentation from content, the history of CSS, sources of styles, selectors, properties, values, and positioning. CSS allows control over font, color, spacing, size, and positioning of elements to change how HTML content is displayed. CSS properties include display, visibility, float, clear, position, and box model properties that affect layout and appearance.
Introduction to CSSAmeer KhanCSS (Cascading Style Sheets) is a rule-based language that applies styling to HTML elements. There are three main ways to apply CSS styles: inline styles, internal style sheets within <style> tags in the <head>, and external style sheets linked via <link> tags. CSS controls elements' properties like color, font size, width, and more using selectors, declarations, and properties. Common selectors include element selectors that style all elements of a type, and ID selectors that target elements with unique IDs. CSS separates structure from presentation, allowing for easier maintenance and interchangeable styling.
chitrasweet chitraCascading 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.
Cascading style sheetssmithaps4This document discusses Cascading Style Sheets (CSS) and its core concepts. It covers the different ways to insert CSS styles (external, internal, inline stylesheets), CSS selectors (type, class, ID selectors), the cascade and inheritance of styles, and some common text properties like color, decoration, and formatting. CSS is used to separate document structure and presentation to make websites easier to maintain and style consistently.
Lecture-6.pptxvishal choudharyCSS (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.
Unit-3-CSS-BWT.pptxTanu524249The document provides information on CSS (Cascading Style Sheets). It discusses the different types of style sheets including inline, internal/embedded, and external stylesheets. It also covers various CSS properties such as text formatting, borders, margins, positioning elements with classes, and color properties. CSS is used to define styles and layouts for HTML documents and makes web pages more presentable.
CssArmy Public School and College -FaisalCSS (Cascading Style Sheets) allows separation of document content from document presentation by defining styles like fonts, colors, spacing in external .css files or internal <style> tags. CSS selectors target HTML elements by name, id, class, or attribute to style them. Styles can be defined externally, internally, or inline. When multiple conflicting styles apply, the cascade order gives precedence to inline styles, then internal and external styles, and lastly browser defaults.
DHTMLRavinder KambojThis document discusses DHTML and CSS. It defines DHTML as a combination of HTML, CSS, and scripting that allows dynamic web pages. It describes the four main components of DHTML - HTML, CSS, scripting languages like JavaScript, and the DOM. It provides details on each component, including how CSS controls formatting, how scripting adds interactivity, and how the DOM defines elements for script access. It also gives examples of using internal, inline, and external CSS stylesheets.
Ifi7174 lesson2óԾ The document provides an overview of Cascading Style Sheets (CSS). CSS allows you to create rules that control the presentation of HTML elements. CSS syntax includes selectors that point to HTML elements and declaration blocks that contain properties and values to style those elements. There are different ways to insert CSS into HTML documents, including external style sheets, internal style sheets, and inline styles. CSS uses the box model to style elements, which includes properties for dimensions, padding, borders, and margins.
Cascading style sheetssmitha273566Cascading Style Sheets (CSS) allow separation of document content from document presentation and formatting. CSS defines how elements should be rendered on screen, paper, or other media. This document discusses CSS syntax, the different ways to insert CSS (external, internal, inline stylesheets), CSS selectors including type, class, ID and descendant selectors, and the cascading order of multiple style sheets. It also covers CSS features such as comments, declarations and properties, and media types for external stylesheets.
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2Erin M. KidwellThe document provides instructions for downloading Aptana Studio and provides a brandery airport code. It includes the following information:
1. It instructs readers to download Aptana Studio from the provided URL if they have not already done so.
2. It provides a brandery airport code of "brandery123".
3. The document does not contain any other information.
BITM3730Week4.pptxMattMarino13The document provides information on CSS (Cascading Style Sheets) and how to apply styles to HTML elements. It defines the three methods for applying CSS - inline, internal, and external stylesheets. It provides examples of each method and explains how to link an external stylesheet to an HTML document using the <link> tag. Key CSS properties for controlling colors, fonts, borders, padding, and margins are also outlined.
css v1 guruGuruPada DasCSS (Cascading Style Sheets) contains rules for presenting HTML content. It separates presentation from HTML markup. CSS allows for multiple browsers to display web pages similarly and simplifies web page design modifications. CSS rules have weights that determine which take precedence when multiple rules apply. CSS selectors target elements using tags, classes, IDs and other attributes to style them. Common CSS properties control color, font, size, spacing and positioning.
Responsive web design with html5 and css3Divya TiwariThe document discusses responsive web design using HTML5 and CSS3. It begins with an introduction to CSS and its evolution. It then covers CSS syntax, selectors, and different ways to insert CSS into HTML documents. The document also discusses CSS3 features like new color properties, typography, box shadows, gradients, and transitions/animations. It provides examples to illustrate CSS3 properties and how they can be used to create stunning visual effects and responsive designs.
CSSMuthuganesh SCSS (Cascading Style Sheets) is a language used to style and lay out web pages. It allows separation of document content from document presentation through external style sheets. There are three main ways to insert CSS - external, internal, and inline. CSS rules are made up of selectors and declarations, where declarations include properties and values separated by a colon. Common selectors include element, id, class, universal, and group selectors. External style sheets can change the look of an entire website by editing just one CSS file linked across pages.
Amazon Sidewalk: A Global Wake-Up Call for the Telecom IndustryDavid Swift𝗔𝗺𝗮𝘇𝗼𝗻 𝗯𝘂𝗶𝗹𝘁 𝗔𝗺𝗲𝗿𝗶𝗰𝗮’𝘀 𝗹𝗮𝗿𝗴𝗲𝘀𝘁 𝗜𝗼𝗧 𝗻𝗲𝘁𝘄𝗼𝗿𝗸—and nobody noticed. 𝗡𝗼𝘁 𝗲𝘃𝗲𝗻 𝘁𝗵𝗲 𝘁𝗲𝗹𝗰𝗼𝘀.
No spectrum auctions.
No cell towers.
No billion-dollar rollouts.
Here's the story... Amazon has quietly launched the largest IoT network in the United States, covering over 90% of the population. This network, known as Amazon Sidewalk, bypasses traditional telecom infrastructure, leverages consumer devices, and utilizes unlicensed spectrum to deliver pervasive, low-bandwidth connectivity. This white paper explores the global implications of Amazon's approach, outlines strategic risks and opportunities for telecom operators, and provides actionable insights for future-proofing telco business models in the face of tech-driven disruption.
Shopify Store Setup_ Database Management for Large Stores.pdfCartCodersDiscover expert Shopify store setup services with CartCoders. Tailored to meet your unique business needs, our team ensures your online store launches smoothly with all necessary features. Maximize your e-commerce potential with our professional support and guidance.
More Related Content
Similar to Cascading Styling Sheets(CSS) simple design language intended to transform the presentation of a Web Pages as well as many ostensibly non web environments (20)
Howcssworks 100207024009-phpapp01Likitha47This document provides an overview of CSS (Cascading Style Sheets), including what CSS is, how it separates presentation from content, the history of CSS, sources of styles, selectors, properties, values, and positioning. CSS allows control over font, color, spacing, size, and positioning of elements to change how HTML content is displayed. CSS properties include display, visibility, float, clear, position, and box model properties that affect layout and appearance.
Introduction to CSSAmeer KhanCSS (Cascading Style Sheets) is a rule-based language that applies styling to HTML elements. There are three main ways to apply CSS styles: inline styles, internal style sheets within <style> tags in the <head>, and external style sheets linked via <link> tags. CSS controls elements' properties like color, font size, width, and more using selectors, declarations, and properties. Common selectors include element selectors that style all elements of a type, and ID selectors that target elements with unique IDs. CSS separates structure from presentation, allowing for easier maintenance and interchangeable styling.
chitrasweet chitraCascading 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.
Cascading style sheetssmithaps4This document discusses Cascading Style Sheets (CSS) and its core concepts. It covers the different ways to insert CSS styles (external, internal, inline stylesheets), CSS selectors (type, class, ID selectors), the cascade and inheritance of styles, and some common text properties like color, decoration, and formatting. CSS is used to separate document structure and presentation to make websites easier to maintain and style consistently.
Lecture-6.pptxvishal choudharyCSS (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.
Unit-3-CSS-BWT.pptxTanu524249The document provides information on CSS (Cascading Style Sheets). It discusses the different types of style sheets including inline, internal/embedded, and external stylesheets. It also covers various CSS properties such as text formatting, borders, margins, positioning elements with classes, and color properties. CSS is used to define styles and layouts for HTML documents and makes web pages more presentable.
CssArmy Public School and College -FaisalCSS (Cascading Style Sheets) allows separation of document content from document presentation by defining styles like fonts, colors, spacing in external .css files or internal <style> tags. CSS selectors target HTML elements by name, id, class, or attribute to style them. Styles can be defined externally, internally, or inline. When multiple conflicting styles apply, the cascade order gives precedence to inline styles, then internal and external styles, and lastly browser defaults.
DHTMLRavinder KambojThis document discusses DHTML and CSS. It defines DHTML as a combination of HTML, CSS, and scripting that allows dynamic web pages. It describes the four main components of DHTML - HTML, CSS, scripting languages like JavaScript, and the DOM. It provides details on each component, including how CSS controls formatting, how scripting adds interactivity, and how the DOM defines elements for script access. It also gives examples of using internal, inline, and external CSS stylesheets.
Ifi7174 lesson2óԾ The document provides an overview of Cascading Style Sheets (CSS). CSS allows you to create rules that control the presentation of HTML elements. CSS syntax includes selectors that point to HTML elements and declaration blocks that contain properties and values to style those elements. There are different ways to insert CSS into HTML documents, including external style sheets, internal style sheets, and inline styles. CSS uses the box model to style elements, which includes properties for dimensions, padding, borders, and margins.
Cascading style sheetssmitha273566Cascading Style Sheets (CSS) allow separation of document content from document presentation and formatting. CSS defines how elements should be rendered on screen, paper, or other media. This document discusses CSS syntax, the different ways to insert CSS (external, internal, inline stylesheets), CSS selectors including type, class, ID and descendant selectors, and the cascading order of multiple style sheets. It also covers CSS features such as comments, declarations and properties, and media types for external stylesheets.
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2Erin M. KidwellThe document provides instructions for downloading Aptana Studio and provides a brandery airport code. It includes the following information:
1. It instructs readers to download Aptana Studio from the provided URL if they have not already done so.
2. It provides a brandery airport code of "brandery123".
3. The document does not contain any other information.
BITM3730Week4.pptxMattMarino13The document provides information on CSS (Cascading Style Sheets) and how to apply styles to HTML elements. It defines the three methods for applying CSS - inline, internal, and external stylesheets. It provides examples of each method and explains how to link an external stylesheet to an HTML document using the <link> tag. Key CSS properties for controlling colors, fonts, borders, padding, and margins are also outlined.
css v1 guruGuruPada DasCSS (Cascading Style Sheets) contains rules for presenting HTML content. It separates presentation from HTML markup. CSS allows for multiple browsers to display web pages similarly and simplifies web page design modifications. CSS rules have weights that determine which take precedence when multiple rules apply. CSS selectors target elements using tags, classes, IDs and other attributes to style them. Common CSS properties control color, font, size, spacing and positioning.
Responsive web design with html5 and css3Divya TiwariThe document discusses responsive web design using HTML5 and CSS3. It begins with an introduction to CSS and its evolution. It then covers CSS syntax, selectors, and different ways to insert CSS into HTML documents. The document also discusses CSS3 features like new color properties, typography, box shadows, gradients, and transitions/animations. It provides examples to illustrate CSS3 properties and how they can be used to create stunning visual effects and responsive designs.
CSSMuthuganesh SCSS (Cascading Style Sheets) is a language used to style and lay out web pages. It allows separation of document content from document presentation through external style sheets. There are three main ways to insert CSS - external, internal, and inline. CSS rules are made up of selectors and declarations, where declarations include properties and values separated by a colon. Common selectors include element, id, class, universal, and group selectors. External style sheets can change the look of an entire website by editing just one CSS file linked across pages.
Amazon Sidewalk: A Global Wake-Up Call for the Telecom IndustryDavid Swift𝗔𝗺𝗮𝘇𝗼𝗻 𝗯𝘂𝗶𝗹𝘁 𝗔𝗺𝗲𝗿𝗶𝗰𝗮’𝘀 𝗹𝗮𝗿𝗴𝗲𝘀𝘁 𝗜𝗼𝗧 𝗻𝗲𝘁𝘄𝗼𝗿𝗸—and nobody noticed. 𝗡𝗼𝘁 𝗲𝘃𝗲𝗻 𝘁𝗵𝗲 𝘁𝗲𝗹𝗰𝗼𝘀.
No spectrum auctions.
No cell towers.
No billion-dollar rollouts.
Here's the story... Amazon has quietly launched the largest IoT network in the United States, covering over 90% of the population. This network, known as Amazon Sidewalk, bypasses traditional telecom infrastructure, leverages consumer devices, and utilizes unlicensed spectrum to deliver pervasive, low-bandwidth connectivity. This white paper explores the global implications of Amazon's approach, outlines strategic risks and opportunities for telecom operators, and provides actionable insights for future-proofing telco business models in the face of tech-driven disruption.
Shopify Store Setup_ Database Management for Large Stores.pdfCartCodersDiscover expert Shopify store setup services with CartCoders. Tailored to meet your unique business needs, our team ensures your online store launches smoothly with all necessary features. Maximize your e-commerce potential with our professional support and guidance.
PresentWEFWEFWERWERWERWERREWREWation.pptxtoxicsupritewfweqrwqerwrwqrwqr qwr qw r qwrqwrqwrqw rqwrqwr qwrq wr wqr qwrfdwqf qw f qwf qw r qw f qw f qwf qw fqw r q2wr q3 32 r qwf qw f as f werweqt we fr ewf we fw qe fw egew g we g ewg ew ewg weg w eg we g ewg we g ewew
Press Conference Future of Business: Trends and Predictions for 2025SanskarTiwari20Press Conference Future of Business: Trends and Predictions for 2025
World’s first Press Conference Portal
www.pressconfere.co.in
#Press #Confernce #Business #Future #Trends
The Evolution of Home Security from Cameras to Smart Systems.pdfInternet Bundle NowExplore how Home Security Cameras evolved into intelligent, connected systems. Internet Bundle Now breaks down the rise of Home Security Services.
The-Power-of-Digital-Marketing-Fueling-Business-Growth.pdfmakelinkak002Transform your business by merging software development with digital marketing services, utilising cloud solutions for scalability, efficiency, and innovation with Makelink Innovation.
IETF 122: draft-ietf-regext-rdap-rir-search-16APNICTom Harrison, Registry Product and Delivery Manager at APNIC, presented updates on the draft regext-rdap-rir-search functionality at IETF 122 held in Bangkok Thailand from 15 to 21 March 2025.
Expert Odoo support services (1).pdfdela33martin33SDLC Corp offers Odoo Support Service, ensuring seamless business operations with expert assistance. Our Odoo ERP Support Services ance performance, while Odoo Technical Support resolves issues enhance efficiently, optimizing workflows, improving system reliability, and boosting productivity for long-term success.
Epochalypse 2038 - Remediating the 32-bit Timestamp Risk at Global Scale (Pub...treykaEpochalypse 2038 - Remediating the 32-bit Timestamp Risk at Global Scale (Public Briefing v1.0 2025-03-31).pdf
ESTUDO DO ARTIGO 22 AO 39 DO CÓDIGO CÍVIL.pdfHELLEN CRISTINAESTUDO DO ARTIGO 22 AO 39 DO CÓDIGO CÍVIL
COM BASE NO ENTENDIMENTO DOS ARTIGOS, ESCOLHER UMA
DOUTRINA E FAZER UM RESUMO SOBRE
MANUSCRITO
4 LAUDAS NO MÍNIMO
PRECISANDO DE AJUDA COМ
TRABALHOS ACADÊMICOS?
DH ASSESSORIA ACADEM
BGP Best Practices, presented by Imtiaz SajidAPNICImtiaz Sajid, Network Analyst / Technical Trainer at APNIC, delivered a remote presentation on 'BGP Best Practices' for MMNOG 7 held Yangon, Myanmar from 19 to 22 March 2025.
Generative artificial intelligence in EU Grant WritingPeter TrkmanThe presentation "AI in EU Grant Writing" by Dr. Peter Trkman and Dr. Luka Tomat focuses on the integration of generative artificial intelligence (GenAI) tools into the process of writing grant applications, particularly in the context of EU-funded projects. It was delivered as part of a workshop held at the University of Ljubljana and is based on the authors’ extensive experience—over 80 workshops since late 2023.
The presentation begins by clarifying what GenAI is and what it is not. It explains how large language models (LLMs) work, including tokenization, vector embedding, and self-attention mechanisms. It introduces major LLMs such as GPT-4, Claude, Grok, Gemini, and others, along with an extensive list of tools built on top of these models.
The core of the presentation is practical. It explores how GenAI can assist in the preparation of grant applications, from generating project summaries and activity plans to producing ethics statements and evaluation responses. Concrete examples are given from Erasmus+ mobility forms, national project applications, and fictional debates using actual EU evaluation criteria.
The authors explain that GenAI is most useful for tasks requiring large volumes of content, knowledge synthesis, translation to various audiences, second opinions, and early drafting. However, they emphasize that it should not be used when accuracy is paramount or when ethical implications are significant. Instead, it is best seen as a complementary tool that boosts productivity, especially for those less experienced in writing.
The presentation includes broader reflections on how GenAI is reshaping research practices and the labor market, with references to studies showing that GenAI often outperforms human analysts in certain tasks and that its emotional support capabilities rival those of trained therapists.
Specific tools for grant writing are introduced, such as DeepRFP, Grantable, and GrantedAI, along with general tools like ChatGPT, Copilot, and Perplexity. The presenters also advocate for long-term structural change in the grant system—streamlining processes to eliminate the need for GenAI use altogether. Until then, they argue, one must “play the game” and use these tools effectively while maintaining academic integrity.
The closing message is clear: while GenAI tools offer powerful support, responsible use and a focus on substance over form remain essential. Peter and Luka invite further contact for tailored workshops and note that all content is based on their personal experience and research, not confidential material.
Generative artificial intelligence in EU Grant WritingPeter Trkman
Cascading Styling Sheets(CSS) simple design language intended to transform the presentation of a Web Pages as well as many ostensibly non web environments
2. What is CSS?
• Cascading Style Sheets, fondly referred to as CSS, is a
simple design language intended to transform the
presentation of a Web Pages as well as many ostensibly
nonweb environments.
• CSS handles the look and feel part of a web page. Using
CSS, you 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.
3. • CSS is easy to learn and understand but it
provides powerful control over the
presentation of an HTML document. Most
commonly, CSS is combined with the markup
languages HTML or XHTML.
4. Where do we use CSS?
• CSS is being used extensively in web and non web
based applications :
• All modern websites make use of CSS to beautify
their web pages.
• Embedded-device displays often use CSS to style
their user interfaces.
• RSS clients also let you apply CSS to feeds and
feed entries.
• Instant message clients also use CSS to format
chat windows.
5. History of CSS
• Cascading Style Sheets level 1 (CSS1) came out of W3C as a
recommendation in December 1996. This version describes
the CSS language as well as a simple visual formatting
model for all the HTML tags.
• CSS2 became a W3C recommendation in May 1998 and
builds on top of CSS1. This version adds support for media-
specific style sheets e.g. printers and aural devices,
downloadable fonts, element positioning and tables.
• CSS3 became a W3C recommendation in June 2012 and
builds on older versions CSS. it has divided into
documentations called as Modules and here each module
having new extension features defined in CSS2.
6. Year Description
1994
HÃ¥kon Wium Lie proposed the idea of CSS to allow web designers
to change the layout, colors, and fonts of their websites.
1996
The first version of CSS was released while the newly established
CSS Working Group moved forward with CSS2.
1998
The second version of CSS was released and work on CSS-3 started
at the same time.
2011
A clarified version of CSS2 called CSS2.1, was released, which fixed
the errors found in CSS 2
2012
As of June 2012, there are over fifty CSS modules published from
the CSS-3 Working Group.
7. Types of CSS
• 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. properties of elements on a web
page.
There are three types of CSS which are given below:
1. Inline CSS
2. Internal or Embedded CSS
3. External CSS
8. 1. Inline CSS
• Inline CSS: Inline CSS contains the
CSS property in the body section attached to
the element is known as inline CSS. This kind
of style is specified within an HTML tag using
the style attribute.
9. Inline CSS Example
<html>
<head>
<title>Inline CSS</title>
</head>
<body>
<p style="color:#009900; font-size:50px;
font-style:italic; text-align:center;">
Nesamony Memorial Christian College
</p>
</body>
</html>
10. 2. Internal or Embedded CSS
• Internal or Embedded CSS: This can be used
when a single HTML document must be styled
uniquely. The CSS rule set should be within
the HTML file in the head section i.e.
the CSS is embedded within the <style> tag
inside the head section of the HTML file.
13. 3. External CSS
External CSS: External CSS contains
separate CSS files that contain only style
properties with the help of tag attributes (For
example class, id, heading, … etc).
• CSS property is written in a separate file with a
.css extension and should be linked to
the HTML document using a link tag. It means
that, for each element, style can be set only
once and will be applied across web pages.
14. External CSS example
body { background-color:powderblue; }
.main { text-align:center; }
.mca { color:#009900; font-size:50px; font-weight:bold; }
#nmcc { font-style:bold;
font-size:20px; }
• Below is the HTML file that is making use of the
created external style sheet.
• link tag is used to link the external style sheet with the
html webpage.
• href attribute is used to specify the location of the
external style sheet file.
15. <html>
<head>
<link rel="stylesheet" href="geeks.css" />
</head>
<body>
<div class="main">
<div class=“mca">Department of Computer Science & Applications</div>
<div id=“nmcc">
Basics of Web Design
</div>
</div>
</body>
</html>
16. Priorities of CSS
• Priorities of CSS: Inline CSS has the highest priority, then
comes Internal/Embedded followed by External CSS which
has the least priority. Multiple style sheets can be defined
on one page. For an HTML tag, styles can be defined in
multiple style types and follow the below order.
• As Inline has the highest priority, any styles that are defined
in the internal and external style sheets are overridden by
Inline styles.
• Internal or Embedded stands second in the priority list and
overrides the styles in the external style sheet.
• External style sheets have the least priority. If there are no
styles defined either in inline or internal style sheet then
external style sheet rules are applied for the HTML tags.
17. CSS Selectors
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.
There are several different types of selectors in CSS.
• Universal Selector
• ID Selector
• Tag Selector
• Class Selector
• Sub Selector
• Attribute Selector
• Group Selector
18. CSS Syntax
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.
You can put CSS Style Rule Syntax as follows −
selector { property: value }
20. 1. Universal Selector
• The universal selector is used as a wildcard character. It selects all the elements on the pages.
<html>
<head>
<style>
* {
color: green;
font-size: 20px;
}
</style>
</head>
<body>
<h2>This is heading</h2>
<p>This style will be applied on every paragraph.</p>
<p id="para1">Me too!</p>
<p>And me!</p>
</body>
</html>
21. 2. 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.
22. ID selector example
<html>
<head>
<style>
#para1 {
text-align: center;
color: blue;
}
</style>
</head>
<body>
<p id="para1">Hello Javatpoint.com</p>
<p>This paragraph will not be affected.</p>
</body>
</html>
23. 3. Tag Selector
• The Tag selector in CSS is used to select and
style HTML elements based on their tag name.
• For example to select all <p> elements and
apply a specific style to them you would use
the following code:
p{color: blue; font-size:16px;}
• This means that all text within <p> tags on the
web page will have a blue color and a font size
of 16px.
24. 4. 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.
25. Class selector example
<html>
<head>
<style>
.center {
text-align: center;
color: blue;
}
</style>
</head>
<body>
<h1 class="center">This heading is blue and center-aligned.</h1>
<p class="center">This paragraph is blue and center-aligned.</p>
</body>
</html>
26. 5. CSS Sub selector
• A CSS selector can contain more than one simple
selector. Between the simple selectors, we can
include a combinator.
• There are four different combinators in CSS:
• descendant selector (space)
• child selector (>)
• adjacent sibling selector (+)
• general sibling selector (~)
•
27. 5.1 Descendant Selector
• The descendant selector matches all elements
that are descendants of a specified element.
• The following example selects all <p>
elements inside <div> elements:
div p {
background-color: yellow;
}
28. 5.2 Child Selector (>)
• The child selector selects all elements that are
the children of a specified element.
• The following example selects all <p>
elements that are children of a <div> element
div > p {
background-color: yellow;
}
29. 5.3 Adjacent Sibling Selector (+)
• The adjacent sibling selector is used to select an
element that is directly after another specific element.
• Sibling elements must have the same parent element,
and "adjacent" means "immediately following".
• The following example selects the first <p> element
that are placed immediately after <div> elements:
div + p {
background-color: yellow;
}
30. 5.4 General Sibling Selector (~)
• The general sibling selector selects all
elements that are next siblings of a specified
element.
• The following example selects all <p>
elements that are next siblings of <div>
elements:
div ~ p {
background-color: yellow;
}
31. 6. Attribute Selector
• The CSS attribute selector is used when we want to
style multiple HTML elements that have the same
attribute or attribute values.
• It is a very convenient way to style multiple-element
by grouping them on a basis of similar attributes.
• The attribute selector selects all the elements that
have a particular attribute and sets the styling for all of
them.
• The attribute selectors are by default case sensitive and
can be written in the square brackets [].
32. Types of attribute selector
• There are several types of attribute selector, which are
given below:
• CSS [attribute] selector
• CSS [attribute="value"] selector
• CSS [attribute~="value"]
• CSS [attribute|="value"]
• CSS [attribute^="value"]
• CSS [attribute$="value"]
• CSS [attribute*="value"]
•
33. 6. CSS [attribute] selector
• The [attribute] selector selects all the
elements that contain the same attribute and
applies the CSS properties to all of them at
once. For example, the .selector [class] will
selects and style all the elements that have
the same class name.
34. <!DOCTYPE html>
<html>
<head>
<title>Attributes selector</title>
<style>
[class] {
background-color: red;
color: black
}
</style>
</head>
<body>
<p class="para">This is the first paragraph.</p>
<p>This is the second paragraph.</p>
<p>This is the third paragraph.</p>
<p class="para">This is the forth paragraph.</p>
</body>
</html>
35. CSS [attribute="value"] selector
• This [attribute="value"] selector allows us to select and set styling properties to all the elements
whose attribute value is the same as the assigned value.
<!DOCTYPE html>
<html>
<head>
<title>CSS attribute selector</title>
<style>
p[class="para"] {
background-color: yellow;
}
</style>
</head>
<body>
<p class="para">This is the first paragraph.</p>
<p class="test">This is the second paragraph.</p>
<p class="para">This is the second paragraph</p>
<p class="test">This is the forth paragraph</p>
</body>
</html>
36. CSS [attribute~="value"] selector
• The CSS [attribute~="value"] selector allows us to set CSS properties to all the elements whose
value contains a specified word.
<!DOCTYPE html>
<html>
<head>
<title>CSS attribute selector</title>
<style>
[class~="test"] {
border: 2px solid red;
}
</style>
</head>
<body>
<p class="para">This is the first paragraph.</p>
<p class="test">This is the second paragraph.</p>
<p class="para">This is the second paragraph</p>
<p class="test">This is the forth paragraph</p>
</body>
</html>
37. CSS [attribute|="value"] selector
<!DOCTYPE html>
<html>
<head>
<title>CSS attribute selector</title>
<style>
[ class|="para"] {
border: 2px solid red;
}
</style>
</head>
<body>
<p class="para-1">This is the first paragraph.</p>
<p class="para-2">This is the second paragraph.</p>
<p class="para-3">This is the second paragraph</p>
<p class="test">This is the forth paragraph</p>
</body>
</html>
38. CSS [attribute^="value"] selector
<!DOCTYPE html>
<html>
<head>
<title>CSS attribute selector</title>
<style>
[class^="test"] {
border: 2px solid yellow;
}
[class^="para"] {
border: 2px solid red;
}
</style>
</head>
<body>
<p class="test-1">This is the first paragraph.</p>
<p class="para-1">This is the second paragraph.</p>
<p class="test-2">This is the second paragraph</p>
<p class="para-2">This is the forth paragraph</p>
</body>
</html>
39. CSS [attribute$="value"] selector
• The CSS [attribute$="value"] selector selects the element whose attribute value ends with the particular value.
• Syntax CSS [attribute$="value"] selector
<!DOCTYPE html>
<html>
<head>
<title>CSS attribute selector</title>
<style>
[class$="1"] {
border: 2px solid yellow;
}
</style>
</head>
<body>
<p class="test-1">This is the first paragraph.</p>
<p class="para-1">This is the second paragraph.</p>
<p class="test-2">This is the second paragraph</p>
<p class="para-2">This is the forth paragraph</p>
</body>
</html>
40. CSS [attribute*="value"] selector
• The [attribute*="value"] selector selects the
element in which the attribute value contains
a specified value.
• Syntax CSS [attribute*="value"] selector
41. <!DOCTYPE html>
<html>
<head>
<title>CSS attribute selector</title>
<style>
[class*="te"] {
border: 2px solid yellow;
}
</style>
</head>
<body>
<p class="test-1">This is the first paragraph.</p>
<p class="para-1">This is the second paragraph.</p>
<p class="test-2">This is the second paragraph</p>
<p class="para-2">This is the forth paragraph</p>
</body>
</html>
42. 7. CSS Group Selector
• The grouping selector is used to select all the
elements with the same style definitions.
• Grouping selector is used to minimize the code.
Commas are used to separate each selector in
grouping.
h1,h2,p {
text-align: center;
color: blue;
}
43. <html>
<head>
<style>
h1, h2, p {
text-align: center;
color: blue;
}
</style>
</head>
<body>
<h1>Hello Javatpoint.com</h1>
<h2>Hello Javatpoint.com (In smaller font)</h2>
<p>This is a paragraph.</p>
</body>
</html>