BootcampHackathonHiring ChallengeAll Events
JobsCoursesCompanies

CSS

Cascading Style Sheets, is a style sheet language that allows the visual formatting of web pages. Alongside HTML and JavaScript, CSS is one of the core building blocks of the World Wide Web.

What is CSS?

CSS is a style sheet language used to shape the visual interface of web pages, including layout, color, and font. Today, CSS has become an integral part of HTML and is used to design every element on a web page in terms of appearance.

It is possible to create basic-level websites using only HTML. However, CSS, as a style language, enables these web pages to be visually appealing and provides a better user experience.

The initial ideas and work on CSS started in 1994 by Håkon Wium Lie, who worked with Tim Berners-Lee at CERN. By 1996, the CSS1 version was published by W3C (World Wide Web Consortium), setting the standards. In 1998, the second version, CSS2, was released, and finally, in 1999, the CSS3 version, which is still actively used and being developed, was published.

Methods of Using CSS

There are different methods you can follow to use CSS in the websites you develop. You can keep the CSS code separate from your other code or write it within the HTML code. These methods are known as external, internal, and inline, respectively. Let's take a closer look at them.

External CSS Usage

You can use .css extension files containing CSS code by calling them from the HTML pages in your project. Writing CSS in an external file is the most widely accepted usage. This method, which shows its benefits in large-scale web projects, provides developers with an easier development and maintenance process. Moreover, it shortens the development time. CSS code written once can be called in different HTML pages, eliminating the need to write CSS code in every HTML page.

To use an external CSS file, you must link the CSS file from the HTML page you want to use it in. To do this, you should specify the location of the CSS code within the <head> .. </head> tags in the HTML file as follows:

<link rel=""stylesheet"" type=""text/css"" href=""style.css"">

Internal CSS Usage

In internal CSS usage, you write your CSS code in a separate section within the HTML file. Similar to external usage, CSS is written, but the CSS code can only be used in the HTML file it is included in. For this type of usage, you can specify and write your CSS code between the <style> .. </style> tags within the <head> .. </head> tags.

<style>
h1 {font-size:32px; color:red;}
p {font-size:25px; color:green;}
</style>

Inline CSS Usage

You can place CSS code within the HTML code, in line with the elements. This method is only used when a style needs to be assigned to a single HTML element. It is a challenging method for developers both when writing the initial code and during subsequent development and editing efforts. Both your HTML and CSS code become complex, and maintaining control over your code becomes difficult.

<h1 style=""font-size:32px; color:red;""> This is a heading </h1>
<h2 style=""font-size:25px;""> This is a subheading. </h2>

By utilizing these CSS methods, you can enhance the visual appeal and usability of your web pages, creating a more engaging user experience.

 

 

"

Next word:
Data
Data, yani veri, yazılım dünyasında temel yapı taşlarından biridir.

Our free courses are waiting for you.

You can discover the courses that suits you, prepared by expert instructor in their fields, and start the courses right away. Start exploring our courses without any time constraints or fees.

TECHCAREER

About Us
techcareer.net
Türkiye’nin teknoloji kariyeri platformu

SOCIAL MEDIA

TwitterInstagramLinkedinYoutubeFacebook

tr


en

All rights reserved
© Copyright 2024
support@techcareer.net
İşkur logo

Kariyer.net Elektronik Yayıncılık ve İletişim Hizmetleri A.Ş. Özel İstihdam Bürosu olarak 31/08/2024 – 30/08/2027 tarihleri arasında faaliyette bulunmak üzere, Türkiye İş Kurumu tarafından 26/07/2024 tarih ve 16398069 sayılı karar uyarınca 170 nolu belge ile faaliyet göstermektedir. 4904 sayılı kanun uyarınca iş arayanlardan ücret alınmayacak ve menfaat temin edilmeyecektir. Şikayetleriniz için aşağıdaki telefon numaralarına başvurabilirsiniz. Türkiye İş Kurumu İstanbul İl Müdürlüğü: 0212 249 29 87 Türkiye iş Kurumu İstanbul Çalışma ve İş Kurumu Ümraniye Hizmet Merkezi : 0216 523 90 26