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

3.  List the ways to include CSS in a webpage.
                   Ans.  In an HTML document, you can apply CSS in three different ways:
                        •   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.
                     4.  What is the purpose of Domain Name System?
                   Ans.   The domain name system (also known as "DNS") is in charge of converting domain names into IP addresses so that the
                       client can access the required Internet resources. When users enter the domain name into their browser, DNS servers
                       convert requests for certain domains into IP addresses, allowing them to control which server they have access to.
                     5.  Name the HTML tag used to:
                        i.  Insert an image                              ii.  Add a row in a table
                       iii.  Emphasize the text                         iv.  Create a hyperlink
                        v.  Add second level of heading

                  Ans.  i.  <IMG>                                        ii.  <TR>
                       iii.  <EM>                                       iv.  <A>
                        v.  <H2>
                     6.  List out any three popular web browsers.                                          [CBSE Handbook]
                   Ans.  Three popular web browsers are Google Chrome, Opera Mini and Microsoft Edge.

                 B.  Long answer type questions:
                     1.  List two advantages and two disadvantages of CSS.
                   Ans.  Advantages:
                        i. CSS saves time since it allows you to code CSS once and then reuse it across various HTML pages. Each HTML

                           element can have its own style, which you can apply to as many Web pages as you desire.

                        ii. Pages load faster since you don't have to write HTML tag attributes every time you use CSS. Simply write a single CSS
                           rule for a tag and apply it to all instances of that tag. As a result, fewer lines of code mean speedier download times.
                        Disadvantages:
                        i.   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.
                        ii.   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.
                     2.  Explain any three selectors in CSS.
                   Ans.  i.  Type Selector
                           The element selector uses the element name to identify HTML elements.
                          p {text-align: left; color: blue;}
                        ii.  ID Selector
                           The id selector uses an HTML element’s id attribute to choose a specific element.
                          #para1 {text-align: center; color: green;}
                       iii.  Class Selector
                           The class selector is used to select HTML items that have a specified class
                            property. Write a dot (.) character followed by the class name to select components with a certain class. The defined
                           rule will apply to all components with that class.
                        Example:
                           .center {text-align: center; color: blue;}
                     3.   Describe how the anchor tag helps to connect two HTML webpages? How can you open an URL into a new tab when
                       clicked using anchor tag?
                   Ans.   To connect two html webpages, an external link is utilised. External links are formed when you want to go to another
                       page or URL by clicking on a link on a webpage. The anchor tag in html is used to create an external link as follows

                       <a href= “Pagename.html”> Click Here </a>
                         By using the target attribute = ="_blank">, we can open the webpage in a new tab: <a href=https://www.cbse.nic.in
                       target="_blank">Visit CBSE Portal</a>

                                                                            Website Development using HTML and CSS   199
   196   197   198   199   200   201   202   203   204   205   206