Login | Register | FAQ
Anonymous

How to incoporate html and css

+ Post a reply

Page 1 of 1


How to incoporate html and css

by Nico7 » Wed Jun 06, 2012 11:33 am

My question might somehow sounds stupid to most of you guys.
this is my first lessons on css i just finished the basic of HTML but i would like to know if html and css are combined together in one lets say notepad or different notepads put in one file(folder). i know html start with either <doctype> or just<html> then </html> from just reading the coding from my software like notepad how do i know if it css or or css in html. or i t is the coding thatare different ? i know html mostly uses < ..> and have seen coding using { } in css. is that the main different. but I will really love to know how to combine everything to one if it is possible.
thanks guys
User avatar

Nico7

  • Posts: 1
  • Joined: Wed Jun 06, 2012 11:06 am

Re: How to incoporate html and css

by chrisf1288 » Wed Jun 06, 2012 4:16 pm

Hey Nico7

CSS can be used with HTML in three different ways: Inline, embedded, and external. External is definitely the best choice. In your .html page place this code somewhere in the head: <link rel="stylesheet" href="style.css" type="text/css">. And for the href attribute just put in the location of your .css file.
If you would rather have the CSS and HTML on the same file, you can use embedded. In embedded you can put all of your CSS inside the <style></style> tags and place it in the head.

I recommend you take the CSS tutorial.
But if you have any other questions, you can just ask.
User avatar

chrisf1288

  • Posts: 128
  • Joined: Sun Jun 26, 2011 1:01 am


+ Post a reply

Page 1 of 1