- When using an external stylesheet on a webpage, this attribute takes the value •type "text/css" - Denotes the name and location of the external stylesheet to be used. •href Note: In external style sheet, you have to create two files one is for specifying styles to the tags and other is the file where you want to apply the above styles. First program will be typed in a notepad and give an extension .html and the second program will be typed in notepad and give and extension .css and then run the html program you will get the output. Program named ess.html First <html> <head> <link rel="stylesheet" type="text/css" href="style1.css" /> </head> <body> <p> The text in this paragraph will be blue. </p> </body> </html> Second program style1.css p When we run the ess.html , the output will be as follows about Internal Style Sheet. Internal or Embedded Style Sheet: Internal stylesheet is used when you want an HTML document to have a unique style. An internal stylesheet is defined using the <style> tag and goes in the head section of an HTML document. The <style> tag specifies the content type of a stylesheet with its type attribute which should be set to "text/css". In internal style sheet once if you specify the style property to any tag then it will apply to all the tags defined with in the body section. Syntax: <style type="text/css"> styles go here </style>
•type - When using an external stylesheet on a webpage, this attribute takes the value "text/css" •href - Denotes the name and location of the external stylesheet to be used. Note: In external style sheet, you have to create two files one is for specifying styles to the tags and other is the file where you want to apply the above styles. First program will be typed in a notepad and give an extension .html and the second program will be typed in notepad and give and extension .css and then run the html program you will get the output. First Program named ess.html <html> <head> <link rel="stylesheet" type="text/css" href="style1.css" /> </head> <body> <p> The text in this paragraph will be blue. </p> </body> </html> Second program style1.css p When we run the ess.html , the output will be as follows about Internal Style Sheet. Internal or Embedded Style Sheet: Internal stylesheet is used when you want an HTML document to have a unique style. An internal stylesheet is defined using the <style> tag and goes in the head section of an HTML document. The <style> tag specifies the content type of a stylesheet with its type attribute which should be set to "text/css". In internal style sheet once if you specify the style property to any tag then it will apply to all the tags defined with in the body section. Syntax: <style type="text/css"> styles go here </style>
DCCN%20FINAL.docx