answersLogoWhite

0


Best Answer

It's called Inline CSS.

here is an an example:

<span style='font-weight:bold; color:red'>Here is some text</span>

Inline is one of the three methods of adding style to a website, the other two are embedded and attached. With embedded css you have a separate section of your page (usually at the top) that defines the css for the rest of the page. The advantage of this is that you can define styles for a whole category of elements instead of just one at a time. here is an example (taken from w3schools.com):

<head>

<style type="text/css">

hr {color:sienna;}

p {margin-left:20px;}

body {background-image:url("images/back40.gif");}

</style>

While this is very usefull, most larger websites use what is called an Attached style sheet. an attached style sheet looks similar to the one above but it actually resides in a separate file that you reference from the main web page. The advantage of an external style sheet is that you can have many different ones that are used for different purposes. for example you might have one that is used for when you are browsing on a computer and another one that is used for when you are browsing via a mobile device.

</head>

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: When CSS is coded in the body of the webpage as an attribute of an XHTML tag it is called?
Write your answer...
Submit
Still have questions?
magnify glass
imp