Jump to content

how include css in html

how include css in html/xhtml?

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

how include css in html how include css in html/xhtml? Rate Topic: -----

#1 User is offline   rohit 

  • W.R. Private
  • Group: Members
  • Posts: 13
  • Joined: 04-May 10

Posted 04 May 2010 - 01:30 AM

iam a new person in this forum and somebody help and appreciate

This post has been edited by rohit: 04 May 2010 - 01:30 AM

0

#2 User is offline   danidallia123 

  • W.R. Private
  • Group: Members
  • Posts: 1
  • Joined: 14-May 10

Posted 14 May 2010 - 06:36 AM

There are two ways to apply CSS to a web page.
Internal CSS

You can add CSS to your HTML documents by simply placing it within the document header. For example, you can specify background color for your HTML document like this:

<html>
<head>
...
<style type="text/css">
body { background-color: red;}
</style>
</head>
<body>
...
</body>
</html>

External CSS

A better way to use CSS is to contain it into an external file, and simply link to that file from the HTML document. This has a number of advantages.
As an alternative to the above example, you can do the following:
<head>
...
<link rel="stylesheet" type="text/css" href="mystyle.css" />
</head>

In this case, mystyle.css will contain only
body { background-color: red;}

Web Design Chennai
0

#3 User is offline   Gresham27 

  • W.R. Private
  • Group: Members
  • Posts: 1
  • Joined: 27-August 10

Posted 27 August 2010 - 12:49 AM

Hi Mate,
I happy to inform you about CSS in HTML , There two types in
linking , internal and external.
Internal linking will be present in the body and for external it is out side the body of HTML code



-------------------

ecommerce websites
0

#4 User is offline   simpson.john54 

  • W.R. Private
  • Group: Members
  • Posts: 5
  • Joined: 20-September 10

Posted 20 September 2010 - 11:34 AM

here is the example for u see in link tag thre specially thn u can understand easily...........



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>index</title>
<link rel="stylesheet" href="name of the css file.css" type="text/css" />
</head>

<body>


</body>

</html>

Simpson.john54
Couches Sectional
0

#5 User is offline   Joe Develper 

  • W.R. Corporal
  • Group: Members
  • Posts: 50
  • Joined: 07-December 10
  • Gender:Male
  • Interests:Web development, Internet Surfing etc.

Posted 07 December 2010 - 04:15 AM

View Postrohit, on 04 May 2010 - 01:30 AM, said:

iam a new person in this forum and somebody help and appreciate


You may follow these steps if you have not understood it properly:

1- First create a blank text document and fill it in with all your css definitions.

Example

td.first{
font-family:Tahoma
}



Then save the page as page.css.

In your HTML page put this tag in between your <head></head> tags. Replace http://www.Yoursite.com/page.css with your website and css file.

<link href="http://www.Yoursite.com/page.css" rel="stylesheet" type="text/css">

Its done :)
0

#6 User is offline   JakeMcGreg 

  • W.R. Private
  • Group: Members
  • Posts: 46
  • Joined: 15-December 10

Posted 17 January 2011 - 10:35 PM

We can have other options other than Tahoma right? Is it the default?
Website Design Packages - CMS Website, SEO Tools & a personalised 12 month strategy guide
0

#7 User is offline   temhawk 

  • W.R. Private First-Class
  • Group: Members
  • Posts: 322
  • Joined: 30-August 07
  • Gender:Male
  • Interests:travel, cg art, macs, music, skateboarding, programming, discovery channel, TextMate 2

Posted 18 January 2011 - 02:57 AM

The default font is determined by the user agent (browser). It's usually "Times New Roman" or "Times". You can use any common font (and enclose the font name with quotes if it contains spaces) or your own fonts by declaring @font-face (however, there are some considerable drawbacks: web browser support, font licensing and the fact that the visitor must download the font files to their computer before it can be displayed!).

This is my list of the most commonly installed fonts:
  • Arial & Arial Black
  • Comic Sans MS
  • Courier & Courier New
  • Georgia
  • Helvetica
  • Impact
  • Tahoma
  • Times & Times New Roman
  • Trebuchet MS
  • Verdana


Your freedom of choosing in this area depends on your target audience and how much you are willing to accept that some people may see a different font (which you should take into consideration when designing the site. choose similar fallback fonts).

This post has been edited by temhawk: 18 January 2011 - 03:27 AM

0

#8 User is offline   EncoderDecoder 

  • W.R. Sergeant
  • Group: Members
  • Posts: 260
  • Joined: 01-March 11
  • Gender:Female
  • Location:Philippines

Posted 02 March 2011 - 09:11 PM

there's also another one.. the embedded style..

can use this code..

<div style="color:red;"></div>

and so on..
-1

#9 User is offline   KarlPalmer 

  • W.R. Private
  • Group: Members
  • Posts: 4
  • Joined: 09-June 11

Posted 09 June 2011 - 03:45 AM

You can actually insert the CSS in the same page where the HTML codes are.
perth web design - Clue Design is capable of providing the market with cutting edge design and clever software, now and into the future.
0

#10 User is offline   EncoderDecoder 

  • W.R. Sergeant
  • Group: Members
  • Posts: 260
  • Joined: 01-March 11
  • Gender:Female
  • Location:Philippines

Posted 14 June 2011 - 09:48 AM

i forgot, there's also the way to link external css..

<LINK REL=StyleSheet HREF="style.css" TYPE="text/css" MEDIA=screen>
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users