├ /markup/ CSS • HTML • XML
├ /low_level/ Assembly • C • C++ • C# • Holy C • Rust
├ /high_level/ ActionScript • Bash • Go • Java • JavaScript • Lua • P • PHP • PowerShell • Python • Ruby • Scratch • SQL
└ /tutorials/ C • C++ • C# • Java • Python • Rust
CURRENT MISSION: Conclude the 2026 soyjak.party hack page, aswell as any pages relating to it, such as the Summer 2026 Crisis page.
Update Quotecord with any relevant info. See the blackboard for more info.
CSS: Difference between revisions
Cobblestone (talk | contribs) mNo edit summary |
m added Category:Markup languages using HotCat |
||
| Line 60: | Line 60: | ||
[[Category:Programming]] | [[Category:Programming]] | ||
[[Category:Markup languages]] | |||
Revision as of 16:49, 6 February 2026

CSS (Cascading Style Sheets) is what is used to style HTML, and XSLT for XML. Obviously it's used on the Soysphere.
Some languages like Java and C# contain interfaces for interacting with CSS (such as in org.w3c.dom.css for Java and System.Web for C#). CSS is not a programming language (as it is not Turing complete), but just a markup language with HTML for customising websites with. It was formerly managed by W3C but it is now by WHATWG.
Tutorial
Step 1
Lets say you have a paragraph on a HTML slide that looks like this.
<p>This is a paragraph.</p>
To make the text red, background light blue and the font family "Tahoma":
<p style="color: red; background: lightblue; font-family: tahoma">This is a paragraph.</p>
Step 2
you can put this in the HTML head to make all paragraphs look like that
<style>
p {
color: red;
background: lightblue;
font-family: Tahoma;
}
</style>
Step 3
But what if you only want certain paragraphs (and other tags) to look like that? Do this in your <head> section:
<style>
.custom-paragraph {
color: red;
background: lightblue;
font-family: Tahoma;
}
</style>
And then change the paragraph to
<p class="custom-paragraph">This is a paragraph.</p>
Step 4
<html>
<head>
<title>CSS test</title>
<style>
.custom-paragraph {
color: red;
background: lightblue;
font-family: Tahoma;
}
</style>
</head>
<body>
<h1>CSS test</h1>
<p>This is a normal paragraph.</p>
<p class="custom-paragraph">This is a custom paragraph.</p>
<h2 class="custom-paragraph">The style you made also works on other elements.</h2>
</body>
</html>
Next steps
Go here to learn more styling tags, like font weight, gradients, borders and more.
CSS is part of a series on
Computing
➜ /languages
➜ /software
├ /forums/ jschan • nusoi • OpenYotsuba • Vichan • XenForo • Yotsuba
├ /operating_systems/ BSD • Linux (Android • Fedora • Linux Mint • Ubuntu • Tails) • TempleOS • Windows
├ /applications/ Flash • GIMP • IRC • MS Paint • Paint.NET • Photoshop • Web Browser
├ /dev/ Free-software license • Game development • Vim
└ /misc/ 4get • Babybot • CAPTCHA • django • Email • JS Paint • MediaWiki • McChallenge • RAID • Ricing • shimmie2 • Snarkysnappydoxingtool.bat • Soyjak Party Enhanced • Systemd
➜ /cyb
➜ /misc
├ /file_formats/ .gif • MIDI • .svg • .webm • .webp
└ /hardware/ Chromebooks • Raspberry pi • ThinkPad • WiFi
➜ /ai
└ Generative AI (ChatGPT • Gemini • Grok • Stable Diffusion) • Vibe coding
