Q. why codes are so difficult to read

Think of a website as having 3 layers - structure, presentation, and function.

HTML is the structural layer.  HTML is what is used to tell a web browser what the content on the page is.  Heading, paragraphs, etc.  

If we think of a website in terms of a building, the HTML is the steel structure that holds the building together.

CSS is the presentational language.  CSS is used to tell the browser how our website should look, or be presented, when viewed in different mediums.  CSS is what we use to say "make all the text on the page red" or "make this list of links have blue backgrounds, and sit on the left hand side of the page".

In terms of our building again, the CSS is the drywall, brick, carpet, and everything else that makes the building pleasing to the eye

JavaScript, (along with PHP/ASP/ColdFusion or another server-side) language are functional layer.  This is what allows your website to "do something".  JavaScript is a client-side language, and has a different purpose than a client-side language, but they are both used to make a website dynamic, so it can do something.

In terms of our building, this would be the doors, lights, electricity, etc
--------------------------
Answer:- Think of a website as having 3 layers - structure, presentation, and function.

HTML is the structural layer.  HTML is what is used to tell a web browser what the content on the page is.  Heading, paragraphs, etc.  

If we think of a website in terms of a building, the HTML is the steel structure that holds the building together.

CSS is the presentational language.  CSS is used to tell the browser how our website should look, or be presented, when viewed in different mediums.  CSS is what we use to say "make all the text on the page red" or "make this list of links have blue backgrounds, and sit on the left hand side of the page".

In terms of our building again, the CSS is the drywall, brick, carpet, and everything else that makes the building pleasing to the eye

JavaScript, (along with PHP/ASP/ColdFusion or another server-side) language are functional layer.  This is what allows your website to "do something".  JavaScript is a client-side language, and has a different purpose than a client-side language, but they are both used to make a website dynamic, so it can do something.

In terms of our building, this would be the doors, lights, electricity, etc

Related Questions