Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Markup (HTML, XHTML, XML) _ easy html css question

Posted by: Alex G Mar 28 2012, 01:51 PM

Hi I'm starting to play around with html and css as in the near future I would like to make a website.

anyway, what I can't seem to do is make my css code work with html.

this is what i have

<html lang="en">
<LINK REL=STYLESHEET HREF="homeaj.css" TYPE="TEXT/CSS" MEDIA=SCREEN>


<head>

</head>
<body> <h1 id="title"> 123456
</h1> </body>
</html>


and the CSS is:

#title { font-style:italic;
}



Can someone please help me and find where I have gone wrong? Because when I preview it, '123456' isn't in italics.

Thank you

Posted by: Christian J Mar 28 2012, 02:45 PM

The LINK element must be inside the HEAD section. Also check that the file homeaj.css exists in the same directory.

You should always use a http://htmlhelp.com/faq/html/basics.html#doctype.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)