What are the three methods for using style sheets with a web-00124
This subjective question is related to the book/course vu bnk603 Consumer Banking. It can also be found in vu bnk603 Mid Term Solved Past Paper No. 1.
Method #1: Embedded method
This method places the CSS code itself inside the tags of your page. With this method each page is separate; therefore, the code must be placed inside each page in order for the styles to work their magic on every page of your website. Example: <!--p { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #000000; h1 { font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #000099; }
Method # 2: Linking to an external style sheet
A separate file is created with the extension ".css?, containing your style definitions (see mystyles.css below).Use <Link> tag inside a web page header to apply these style definitions. mystyles.css: h1 {color: red} P {font-size: 34pt} Example: <HTML> <head> <Link Rel="stylesheet" Type="text/css" href="mystyles.css"> </head> <body><h1>this heading will appear red</h1> <p> this line has a 34pt font</p></body> </html>
Method # 3: Inline styles
It is used where a particular tag is to be given a different style. We use "style as an attribute in a tag and give properties/values in a format as shown in the example below: <HTML><body><h1 style="font-size: 40pt">this heading has font-size 40-point</h1> </body></HTML>