Friday, 24 July 2020

If I am using link tag in the head part of my HTML web page which method of CSS I am applying to my webpage ?

If I am using link tag in the head part of my HTML web page which method of CSS I am applying to my webpage ?


Hello Guys Welcome my Website today i will solve a qustion to   if you using link tag in the head part of your HTML webpage so which  method of CSS are applying by you on your webpage ?  and also discuss about how to link a CSS file with HTML page  ?
So lets start

1.what is CSS ?

CSS stand for Cascading Style Sheets .CSS is a style sheet language used for describing a prasentation of document written in markup language like HTML.
A CSS is a cornerstone technology of the World Wide Web ,Alongside HTML and Javascript.
You can design your page through CSS. and dyanamicaly .

 

2.How CSS use ?

CSS are using in two type igther you are creating external CSS or internal CSS.
1.Internal CSS
2.External CSS

How to Link a Style Sheet (CSS) File to Your HTML File

Embedding CSS rules to HTML can be time-consuming and energy-wasting. Luckily for you, there is another way to do it. Here, we’ll uncover how to link CSS to HTML file. By using the following method, you’ll get to combine both CSS and HTML in the most efficient way.
CSS is a style sheet language that manages the website’s visual representation. Commonly used with markup languages like HTML, CSS allows you to style each HTML element and give your overall site a more appealing look.
While there are many ways to add CSS to HTML, the simplest method of doing it is by adding all the CSS rules to the HTML directly. Despite so, this CSS method carries many disadvantages. Aside from bloating your code with repetitive CSS rules, its editing process is time-consuming as changes made in one file won’t apply to the others.
To avoid these hassles, you can put the CSS styles into a .css file and link it to the HTML files. That way, one CSS file can be used to style many HTML pages.
Here are the advantages of linking a CSS file to HTML:
  • Time-effective — you only need to create a single CSS file to style all HTML files.
  • Faster load time — the site will cache the CSS file for your visitors’ next visit.
  • Improve SEO — storing CSS styles in another file makes the HTML file more concise and readable by search engines.

3.How to Connect a CSS External Style Sheet to HTML File


To link CSS to HTML file,we use the <link> tag , that write in HTML's <head> Section .Look like this

<html>
<head>
<link>     </link>
</head>
<body>
body of code..........................................
</body>
</html>


Ectually a <link> are written of this type
<link rel="stylesheet" type="text/css" href="stylesheet.css" media="screen"/>

  • rel — defines the relationship between the file that hosts this command and the file defined in the href attribute. The standard value for this attribute is stylesheet.
  • type — defines the content of the linked file. In this tutorial, we set this attribute’s value to text/css. However, you can skip it altogether if you’re using HTML5.
  • href — specifies the location of the CSS file you want to link to the HTML. If the CSS file is in the same directory as the HTML file, you only need to enter the file name. Otherwise, you need to include the folder name in which you store the CSS file (example: CSS/stylesheet.css).
  • media — specifies the type of media the CSS rules are optimized for. In this tutorial, we use the screen value to imply its use for computer screens. If you want to apply the CSS rules to printed pages, you can set the value to print.
 

No comments:

Post a Comment