Cascading Style Sheet Flashcards
(143 cards)
used to control the style of a web document in a simple and easy way.
CSS (Cascading Style Sheet)
CSS is the acronym for?
Cascading Style Sheet
Enumerate the key advantages of learning css:
- Create stunning website
- Become a web designer
- Control Web
- Learn Other Languages
- 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 and others
Create Stunning Website
If you want to start a career as a professional web designer, HTML and CSS designing is a must skill
Become a web designer
- 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.
Control web
Once you understands the basic of HTML and CSS then other related technologies like javascript, php, or angular are become easier to understand.
Learn other languages
What is the output of this?
<!DOCTYPE html>
<html>
<head>
<title>This is document title</title>
<style>
h1 { color: red; }</style>
</head>
<body>
<h1>Hello World!</h1>
</body>
</html>
” Hello World! “ ( the text color is red)
Enumerate the application of css:
- CSS saves time
- Easy Maintenance
- Pages load faster
- Superior styles to HTML
- Multiple Device Compatibility
- Global web standards
You can write CSS once and then reuse same sheet in multiple HTML pages.
CSS saves time
To make a global change, simply change the style, and all elements in all the web pages will be updated automatically.
Easy maintenance
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.
Pages load faster
- CSS has a much wider array of attributes than HTML,
- Give a far better look to your HTML page in comparison to HTML attributes.
Superior styles to HTML
Style sheets allow content to be optimized for more than one type of device.
Multiple Device Compatibility
- HTML attributes are being deprecated and it is being recommended to use CSS.
- start using CSS in all the HTML pages to make them compatible to future browsers.
Global web standards
an HTML tag at which a style will be applied.
selector
A type of attribute of HTML tag which cover all the HTML attributes are converted into CSS properties.
Property
assigned to properties. An example is color property can have value either red
Values
syntax of CSS rules:
selector { property: value }
syntax that selects all the elements in a document
*{ color:red;}
selects all the elements in a document
Universal Selector
syntax that selects all elements that match selector
ul {color:red; }
Selects all elements that match selector
Type selector
syntax selects elements whose id attribute’s value matches the selector
intro { color=red; }
elements whose class attribute's value is "side."
elements that are direct children of a
element after an
element.
elements that are siblings of an
element.
elements on the page will be center-aligned, with a red text color:
CSNHS Web Programming
Senior High School
CSNHS Web Programming
Senior High School
CSS: #first { font-size: 40px; color: green; text-align: center; } #second { font-size: 30px; color: red; }