Page 181 - Web Applications (803) Class 11
P. 181

Ð ÐGlobal  web standards:  HTML  attributes  have  been  deprecated  by  web  standards  around  the  world,  and  it  is
                   recommended that you use CSS instead. It's a good idea to start adding CSS into all HTML pages to make them
                   compatible with future browsers.
                 Disadvantages of CSS

                 Some of the disadvantages of CSS are as follows:

                 Ð ÐMultiple browsers checking: When it comes to CSS, what works in one browser may not function in another. The
                   web developers must test the program's compatibility by executing it in multiple browsers.

                 Ð ÐBrowser compatibility: CSS works differently on different web browsers. Edge and Opera supports CSS as different logic.
                 Ð ÐComplicated  for  non-developers:  For  non-developers  and  newbies,  the  world  of  programming  languages  is
                   confusing. CSS levels, such as CSS, CSS 2, and CSS 3, can be rather confusing.

                    Do You Know?


                    Ð  CSS was created in 1994 by Hkon Wium Lie while working at CERN with Tim Berners-Lee. The goal of CSS was to
                      create a system for styling the information that was being presented (which was completely non-existent at the
                      time) and to separate the styling process from the content production process.
                    Ð  We can make better backgrounds with CSS! As a result, boring and unchanging backgrounds are no longer required.
                      Previously, additional programming and scripting were required, but CSS3 now makes this possible.



                   2.14 LINKING STYLE SHEET

                 In an HTML document, you can link CSS in three different ways which are as follows:

                 Ð ÐExternal Style Sheet: Define style sheet rules in a separate.css file and then use the HTML link tag to include that
                   file in your HTML content.
                  ÐInternal Style Sheet: Using the <style> tag, define style sheet rules in the HTML document's header section.
                 Ð
                 Ð ÐInline Style Sheet: Using the style attribute, define style sheet rules inline alongside HTML components.
                 Let’s take a look at each of the three scenarios one by one using appropriate examples.

                 External Style Sheet

                 An external style sheet is used to apply a rule to several pages. It is a distinct CSS file that may be accessed by linking
                 to it from the webpage's head section. The stylesheet can be accessed from several webpages using the same link.
                 The link to an external style sheet is included in the page’s head section:

                 <head>
                 <link rel="stylesheet" type="text/css" href="style1.css">
                 </head>
                 Example:
                 Style1.css has the following rules

                 body
                 { background-color: pink;}
                 h1
                 { color: maroon; font-size: 20px;
                 font-family: courier; font-style: italic;}





                                                                            Website Development using HTML and CSS   179
   176   177   178   179   180   181   182   183   184   185   186