Sitemap
Umahiliny

Umahiliny

CSS

2 min readDec 6, 2022

--

  1. WHAT IS CSS?

CSS is the language for describing the presentation of Web pages, including colors, layout, and fonts.

2.What are the 3 types of CSS?

.Inline CSS.

.Internal or Embedded CSS.

.External CSS.

3.Why CSS is used in HTML?

Why CSS is used in HTML? CSS for color, font, text size, spacing between elements, positioning of elements and any background images or background colors used.

4.What is difference between CSS and HTML?

CSS is a language that describes the presentation of web pages, including colors, layout, and fonts. CSS is independent of HTML and can be used with any XML-based markup language.

4.What is CSS syntax?

The selector points to the HTML element you want to style. The declaration block contains one or more declarations separated by semicolons. Each declaration includes a CSS property name and a value, separated by a colon.

Inline CSS.

An inline CSS is used to apply a unique style to a single HTML element. An inline CSS uses the style attribute of an HTML element.

Get Umahiliny’s stories in your inbox

Join Medium for free to get updates from this writer.

<tagname style=”property:value;”> Content </tagname>

Internal or Embedded CSS.

An internal CSS is used to define a style for a single HTML page

<head>

<style>

Tag {

Property:value;

}

.Class{property:value;}

#ID{property:value;}

</style>

</head>

External CSS.

An external style sheet is a separate CSS file that can be accessed by creating a link within the head section of the webpage.

<link rel=”stylesheet” href=”styles.css”>

Press enter or click to view image in full size

5.Where is external CSS used?
An external style sheet is a standalone . css file linked from a web page. Using external style sheets, you can apply rules to multiple web pages. If you ever need to make widespread changes to your website design, a single change in the style sheet can be applied to all linked pages, saving lots of time and effort.

--

--