+6

<link rel="stylesheet" type="text/css" href="mystyle.css"> please how is this used

How can I create mine and how can I use it

11/7/2019 1:20:46 PM

Victor Aries

15 Answers

New Answer

+7

The <link> tag is Used to include an external css file and must be inside <head> tag Href attribute is the source of the file I think the "type" attribute is optional in HTML5

+6

Is the css created outside in another page then added with a link 🔗??

+6

As you create Html file same like as css file. Save it with .css extension. As you know there is 3 types to apply css in Html. 1-using inline CSS 2-using internal CSS 3-external CSS When you want to apply too much inline CSS but same style in every Html file then you need to create external file. So there is no need to write same CSS again and again in multiple html pages Better to write in single file and import in multiple html pages.

+3

This is a feature of Html to include external CSS file.

+3

This feature may not be available on solo learn. But it works on mobile as well as in computer. I do not know how to link external css in solo learn. There is a css style sheet in solo learn but that doesn't need link tag. Make sure all your files is in same folder or you know paths of different your css files. Write path of your file in place of my style. css It should work on mobile phones also. But in solo learn. It may not work.

+3

You can create another file with . css extension. That file will be your external css

+3

https://code.sololearn.com/WCvJ69948z6e/?ref=app

+2

A J how is the external css created and when can it be created

+2

This code is for changing background. It has external css but it doesn't need link tag. As this code is in solo learn but out side of solo learn this css will not work if do not use link tag in your html

+1

Victor Aries This is used when you apply external CSS to your page. You create a new file with the extension ".css" and link it to your html part. The <link rel="stylesheet" from my understanding, I think means that you're making reference to a stylesheet page. The attribute type="text/css" is there to explain that the stylesheet page you're making reference to is in text The last part (href="mystyle.css") is the path of the file to be used.

+1

Make a external css bro like a mystyle.css

+1

by copy that code and paste it into the head section of your html file

+1

It's the way to link external css file in your html code, and one thing more, always use standard styles for good practice.

+1

Hello i m a new enter the group so i need help

+1

Stane Nutsule What kind of help you need?