0% found this document useful (0 votes)
28 views

Cascading Style Sheets (CSS)

Uploaded by

mehuljain.1604
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
28 views

Cascading Style Sheets (CSS)

Uploaded by

mehuljain.1604
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 9
Lear NEOnlne Cascading Style Sheets (Css) An Introduction to Cascading Style Sheets Learn LIVE Online CSS CSS Logo Vedaniti, Lear NEOnlne CSS, often known as cascading style sheets, is an easy-to-use design language created to make it quicker and easier to present wed pages. CSS controls the look and feel of a web page. CSS may be used to manage a variety of effects, including text colour, font style, paragraph spacing, column size and arrangement, background images or colours, layout designs, and variances in how the content appears on various devices and screen sizes Although CSS is simple to grasp and master, it offers strong control over how an HTML document is presented. CSS is most frequently used in conjunction with HTML or XHTML as markup languages *CSS explains how HTML components should appear on a screen, in print, or in other media *A lot of work is saved via CSS. It may oversee the concurrent design of many web pages. * In CSS files, external stylesheets are stored. CSS Syntax Vedaniu, Learn LIVE Oniine Selector Declaration Declaration {color : blue; font- size: 12px;} Property Value Property Value CSS Syntax Structure Vedaniti, Lear UNE Online The HTML element you wish to style is indicated by the selector. One or even more declarations are contained in the declaration block, and they are divided by semicolons. A comma separates the name of the CSS property from its value in each declaration. Semicolons are used to separate multiple CSS declarations while curly braces are used to enclose declaration blocks. Example In this example, all elements will be centre-aligned, with a BLUE text colour: vt colour: blue; text-align: centre; } CSS Background A page's background colour can be changed using CSS. It activates the background-colour property, which designates an element's background colour. There are 5 CSS background attributes that have an impact on HTML elements: 41. Background-Colour in CSS Apage's background colour is set as follows Example: body { background-colour:crange; } 2. Background-Image in CSS ‘An Image’s background is set as follows: Example: Vedaniti, Lear UNE Online 3. Background-Repeat in CSS Apage's background repeat is set as follows:

Hello vedantu.coms/n1> 4. Background-Attachment in CSS Apage's background attachment is set as follows Example background: blue url(‘bbb git) background-repeat: no-repeat: background-attachment: fixed §. Background-Position in CSS Apage's background position is set as follows: The following positions can be changed Vedaniti, Lear UNE Online 1 Left 2. Right 3. Centre 4 Top 5. Bottom Example background: blue url(good-afternoon jpg’) background-repeat: no-repeat: background-attachment fixed background-position: top; Solved Questions 4. What are CSS Comments? Ans: Code explanations are provided through comments, which may be useful if you decide to alter the source code in the future. Browsers don't read comments The element contains a CSS comment that begins with /* and ends with */ 2. What advantages does CSS offer? Ans: The style and feel of a web page are handled by CSS. The colour of the text, the font style, the distance between paragraphs, the size and arrangement of columns, etc. may all be altered using CSS. CSS is time-saving since you can create it once and reuse it across several HTML pages. Learning by Doing Write True or False. 1. CSS can be used to read any files. (T/F) Vedaniti, Lear NEOnlne Z.Udd IS all SASY-LO-USE GESIUN language CIE LO MAKE IL QUICKe! anu easier lw present wen pages (T/F) 3. Very less work is saved via CSS. (T/F) 4.CSS can manage the design of several wed pages simultaneously. (T/F) Summary Cascading Style Sheets (CSS), a language for creating stylesheets, may be used to specify the look of an HTML or XML document (including XML dialects such as MathML, XHTML, or SVG). In order to style a Web page, we need CSS. In addition to voice, paper, screens, and other media, CSS also specifies how objects should be shown in other media. Along with HTML and JavaScript, CSS is one of the World Wide Web's foundational technologies. Time is greatly reduced by the usage of CSS. It can control the design of several web pages at once. As a markup language, CSS is most typically used in combination with HTML or XHTML. Vedaniti, Lear UNE Online Hi Mehul, Best courses for you Crash course Full syllabus LIVE One-to-one LIVE courses classes Stariing from 749 Starling from %2,500/month Starting from &1,000/h Test series Starting fom 22,110 Show more courses ¥ LIVE Masterclass Vedaniti, Lear NEOnlne E English Social Scence Ultimate Refresher on Adverbs | ‘Super Fighter Planes of India | Adventure BI Get exclusive access to Vedantu founders for thier expert Pea ee et Nace kok reece Book your Free Demo session Get a flavour of LIVE classes here at Vedantu Book a free demo Vedantu Improvement Promise We promise improvement in marks or get your fees back. T&C Apply*

You might also like