Q1: Answer the following questions (2\"1-2 Marks) a) What is the difference betw
ID: 3728283 • Letter: Q
Question
Q1: Answer the following questions (2"1-2 Marks) a) What is the difference between internal and external CSS file? If you were to choose between internal and external CSS file, which one you would choose and why? Answer: b) Observe the following file. Suppose, you have an external CSS file names styles.css and you want to save it inside ess folder, with respect to the html file. Fill up the following gaps. html> (!DOCTYPE html> Chead> CSS «title>Using Potatoes There are dozens of different potato varieties. They are usually described as early, second early and maincrop.Explanation / Answer
ANSWER 1(a):
Internal style sheets are the ones that you write within the same html file,i.e, the html code and CSS code are in the same file.
External style sheets are those that are in a separate file than the html code,i.e, the html file is separate(.html) and CSS file is separate(.css).
The CSS file is used in the html file by referring to it's file name by something like this:
<link rel = “stylesheet”
type = “text/css”
href = “cssfile.css” />
External CSS are best practice as it gives you some amazing power to use the same class for different elements of html. Suppose you have to use a common heading throughout the page and if you are going to write some CSS for that, you have to write the same for every heading when you are using inline CSS, but you can do it using a common class in external file and can use that class wherever you want. Some good things using external CSS are:
Inline CSS are preferred first when browser read your code, then internal CSS and at last external one. Be aware of using these as per their use.
ANSWER 1(b): As from the above explanation we know that how to add external css file as href="filename.css" so here in the fill up href="styles.css" will come. And rest of the program is correct.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.