web Technology in short we call it as CSS. Basically CSS are used to give style
ID: 3756578 • Letter: W
Question
web Technology
in short we call it as CSS. Basically CSS are used to give style to your Static or Dynamic HTMLpage. when you are working with web applications user interface is very importent. to make your page more attractive CSS is very usefully and easy to learn and impliment.
You can include CSS in your html page in 4 ways 1) Internal 2) Inline 3)External 4)Embeded
When you write stylesheet code with in the <head> tag insdie the <style>, is called Internal CSS
when you Write CSS code in other file and Saved it with .CSS extension and you include it by using <link> then that is called External CSS.
Some times you will apply Style with in the Html line itslef. A paragraph style can be given ther itself with the help of <style>. that is called Inline CSS.
Embedded CSS is similar to inline CSS. The Style of a paricular tag will be given there itself. that is called Embedded CSS.
Example: 1. <html>
<head> <link rel="style sheet" src="extrenalstyleSheet.css"> <style>
.css1
{
background-image:URL("");
color:red;
text-align:center;
float: right;
}
</style>
</head>
<body>
<div class="css1"><p>hello</p>
</body>
</html>
Advantages:
You can specify how the elements with in your page should be alligned
you can get flexibility to change User Interface how you want, very easliy using CSS.
You can write CSS styleing very easily and you can maintain easily as well
easy to modify the code and style
Fast Web Loading is the main advantage, which will reduce the server loading burden.
While Printing the page CSS will give friendly environment.(fit for the printer format).
DIfference Between External and Embeded CSS: The main difference is code Reusability. It is very easy to apply Embeded CSS but when the same style should be applied to many other file then you need to write same code in each and every other docunments. By using External CSS the above scenario can be fullfilled easily.
Explanation / Answer
I could not find any problem statement on this post. In order to answer your problem, please provide the following details:
For time being, i am providing examples of external vs embedded CSS. In case you have any doubts, please reach out to me.
Embedded CSS:
<!DOCTYPE html>
<html>
<head>
<style>
body {background-color: powderblue;}
h1 {color: blue;}
p {color: red;}
</style>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
External CSS:
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
styles.css
body {
background-color: powderblue;
}
h1 {
color: blue;
}
p {
color: red;
}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.