External Stylesheet
External Stylesheet
Create a .css file that contain the only css script anmd link it into .html or . php page based on requirement.
<head>
<link type=”text/css” rel=”stylesheet” href=”css_filename.css”>
</head>
Example:
File name Style.css
P { Color:red; }
Html file:
<html>
<head>
<link type=”text/css” rel=”stylesheet” href=”style.css”>
</head>
<body>
<p>cs-tutorial is a best website for html tutorial</p>
</body>
</html>
Qus. 1 : Which tag is used to link an external style sheet to a webpage?
- <Link> tag
- <Style> tag
- <Script> tag
- @media
- <!-- Comment -->
- // Comment
- /* Comment */
- # Comment
- It is a separate document that contains CSS rules
- It separates content from the presentation but both are still contained in a single file
- It separates the content and style into separate files
- . It allows a web designer and a content author to work in parallel