DEV Community

Sudhakar V
Sudhakar V

Posted on

Overview of HTML, CSS, and JavaScript

1. HTML (HyperText Markup Language)

  • Purpose: Structures web content (text, images, links, etc.).
  • Role: Defines elements like headings (<h1>), paragraphs (<p>), forms (<form>), etc.
  • Example:
  <h1>Hello World</h1>
  <p>This is a paragraph.</p>
Enter fullscreen mode Exit fullscreen mode

2. CSS (Cascading Style Sheets)

  • Purpose: Styles and layouts HTML elements (colors, fonts, spacing).
  • Role: Controls visual presentation using selectors and properties.
  • Example:
  h1 { color: blue; }
  p { font-size: 16px; }
Enter fullscreen mode Exit fullscreen mode

3. JavaScript (JS)

  • Purpose: Adds interactivity and dynamic behavior.
  • Role: Manipulates DOM, handles events, fetches data, etc.
  • Example:
  document.querySelector("h1").addEventListener("click", () => {
    alert("Heading clicked!");
  });
Enter fullscreen mode Exit fullscreen mode

How They Work Together

  • HTML = Skeleton (structure).
  • CSS = Skin (appearance).
  • JavaScript = Brain (functionality).

These three form the foundation of front-end web development. 🚀

Heroku

Built for developers, by developers.

Whether you're building a simple prototype or a business-critical product, Heroku's fully-managed platform gives you the simplest path to delivering apps quickly — using the tools and languages you already love!

Learn More

Top comments (0)