CSS Basics - Inline, Internal, and External CSS Explained
webdev•Jan 6, 2026

CSS Basics - Inline, Internal, and External CSS Explained

CSS is used to define styles for web pages, including design, layout, and variations for different devices and screen sizes. Learn about the different types of CSS and how to add them to your HTML.

devTo

devTo

Original source

Key summary

This blog article discusses the basics of CSS, including its version, structure, and types. It explains how to add CSS to HTML, including inline, internal, and external methods.

TL;DR

  • CSS is used for web page design, layout, and device variations.
  • CSS is currently in version 3 (CSS3).
  • A CSS rule consists of a selector and a declaration block.
  • There are three types of CSS: inline, internal, and external.
  • Inline CSS is written directly inside an HTML tag using the style attribute.
  • Internal CSS is written inside a <style> tag within the <head> section of an HTML page.
  • External CSS is written in a separate .css file and linked to HTML.

This content is automatically summarized using AI. For full context, always refer to the original article.

Related posts

Subscribe For New Content Updates

By becoming a member of our blog, you have access to articles and content.