I know this two programming language are ways to create website. Yet, I'm still confuse with the difference between the two. I would like also to know which is easier to do in creating website?

3 answers

danwellman 5600
2
points

Neither of them are really programming languages. HTML is a mark-up language that describes the structure and content of a web page. CSS controls the appearance of the elements the page is built from. Both are required to make a webpage, unless you want a black and white, plain text webpage, in which case only HTML is required.

Answered over 4 years ago by danwellman
jp19 25
1
point

Below is a simplified answer, may not be 100% technically correct in terminology, but perhaps good enough to clarify your basic doubt:

HTML is the language, that can be used to format contents displayed in webpages and control their layout, look and feel, etc. In the starting phase of internet (very first websites), pages would be written only in HTML. Over a period of time, people realized that their are 4 key components in a webpage:

1) The content

2) The layout itself (defining various sections of the page)

3) Fine details about the look and feel of the layout (color, corner shapes, shading, and tons of other parameters)

4) Special effects - animations and much more

The sectioning part of it (defining elements or components of the page) is what is HTML now. The finer look and feel control has moved to CSS. Though you can still use pure HTML for controlling finer details, its old fashioned way and separating that code in CSS is more elegant, more poweful (more features) and more modular (easy to maintain, code reuse, etc). Special effects are usually done using Javascript (which is programming), though CSS3 provides rich set of commonly used effects to make the design light weight.

So typically, when you create a website, you will be using HTML & CSS both. You can avoid "much" of CSS by using old fashioned HTML code, but its highly recommended you keep the sectioning of the page in HTML and the look and feel in CSS for long term benefits.

Answered over 4 years ago by jp19
Alex Holt 341
0
points

A simpler way to look at this is:

HTML: defines the structure of the document.

CSS: defines the presentational styles.

As mentioned by jp19 - to build a website you will typically use both (and usually JavaScript as well).

Answered over 4 years ago by Alex Holt