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

From Soyjak Wiki, the free ensoyclopedia
Jump to navigationJump to search
No edit summary
mNo edit summary
Line 7: Line 7:


== Tutorial ==
== Tutorial ==
{{Slideshow
 
|prefix=1
=== Step 1 ===
|title=tutorial
Lets say you have a paragraph on a [[HTML]] slide that looks like this.
|count=5
|slide1title=Step 1
|slide1content=Lets say you have a paragraph on a [[HTML]] slide that looks like this.
<pre><p>This is a paragraph.</p></pre>
<pre><p>This is a paragraph.</p></pre>
To make the text red, background light blue and the font family "Tahoma":
To make the text red, background light blue and the font family "Tahoma":
<pre><p style="color: red; background: lightblue; font-family: tahoma">This is a paragraph.</p></pre>
<pre><p style="color: red; background: lightblue; font-family: tahoma">This is a paragraph.</p></pre>
|slide2title=Reusing styles
 
|slide2content=you can put this in the HTML head to make all paragraphs look like that
=== Step 2 ===
you can put this in the HTML head to make all paragraphs look like that
<pre><style>
<pre><style>
p {
p {
Line 25: Line 23:
}
}
</style></pre>
</style></pre>
|slide3title=Only styling some tags
=== Step 3 ===
|slide3content=But what if you only want certain paragraphs (and other tags) to look like that? Do this in your <head> section:
But what if you only want certain paragraphs (and other tags) to look like that? Do this in your <head> section:
<pre><style>
<pre><style>
.custom-paragraph {
.custom-paragraph {
Line 36: Line 34:
And then change the paragraph to
And then change the paragraph to
<pre><p class="custom-paragraph">This is a paragraph.</p></pre>
<pre><p class="custom-paragraph">This is a paragraph.</p></pre>
|slide4title=End result
=== Step 4 ===
|slide4content=<pre><html>
<pre><html>
<head>
<head>
<title>CSS test</title>
<title>CSS test</title>
Line 55: Line 53:
</body>
</body>
</html></pre>
</html></pre>
|slide5title=Next steps
=== Next steps ===
|slide5content=Go [https://www.w3schools.com/css/default.asp here] to learn more styling tags, like font weight, gradients, borders and more.
Go [https://www.w3schools.com/css/default.asp here] to learn more styling tags, like font weight, gradients, borders and more.
}}
 


{{Programming}}
{{Programming}}


[[Category:Programming]]
[[Category:Programming]]

Revision as of 16:31, 15 December 2025

>Though maybe you were looking for Customization#CSS Scripts or CS:Soy?
CSS is known as one of the 3 glowie (((core))) technologies for the web alongside HTML and JavaScript.

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

first

➜ /languages

├ /markup/ CSSHTMLXML
├ /low_level/ AssemblyCC++C#Holy CRust
├ /high_level/ ActionScriptBashGoJavaJavaScriptLuaPPHPPowerShellPythonRubyScratchSQL
└ /tutorials/ CC++C#JavaPythonRust

➜ /software

├ /forums/ jschannusoiOpenYotsubaVichanXenForoYotsuba
├ /operating_systems/ BSDLinux (AndroidFedoraLinux MintUbuntuTails) • TempleOSWindows
├ /applications/ FlashGIMPIRCMS PaintPaint.NETPhotoshopWeb Browser
├ /dev/ Free-software licenseGame developmentVim
└ /misc/ 4getBabybotCAPTCHAdjangoEmailJS PaintMediaWikiMcChallengeRAIDRicingshimmie2Snarkysnappydoxingtool.batSoyjak Party EnhancedSystemd

➜ /cyb

➜ /misc

├ /file_formats/ .gifMIDI.svg.webm.webp
└ /hardware/ ChromebooksRaspberry piThinkPadWiFi

➜ /ai

SOYNY