• Before posting a question, please check our Frequently Asked Questions page as well as previous threads here. Odds are you aren't the first to ask, and you may find the answer without having to post!

CSS over HTML?

sorrow made you

from the bottom of the dark, dark sea
Roleplay Availability
Roleplay Type(s)
This isn't so much a suggestion rather than a question, because I don't know much about the physical capabilities.


Anyways, I am not completely literate in HTML nor CSS, but in attempts to learn, I've looked up the differences between the "languages."


This is taken from http://www.codingdojo.com/blog/html-vs-css-inforgraphic/


"Quite simply, HTML (Hypertext Markup Language) is used to create the actual content of the page, such as written text, and CSS (Cascade Styling Sheets) is responsible for the design or style of the website, including the layout, visual effects and background color."


"HTML (Hyper Text Markup Language) was created to help programmers describe the content on a website like <this is a heading>, <this is a paragraph>. HTML uses tags to help you add paragraphs, headers, pictures, bullets and other pieces of structure. Just like you would write something on a word document, HTML helps you write something on a website."


"Created to compliment HTML, CSS (CascadingStyle Sheets) is what makes a website look and feel amazing. Presentation and ease of use have been some of the qualities CSS has brought to web development. It is more involved with changing a websites style rather than its content. Kind of like changing the font size, font color and positioning on a word document. CSS is in charge of the way the content looks on a page and what else goes on it to compliment that content."


This has also been cited to http://www.w3schools.com/





So I suppose my question is, is it possible to instead of allowing users to use HTML (which could potentially change the site itself done incorrectly) to allowing users to use CSS? Since CSS is a compliment to HTML, I can see it having the same results, just with being able to lay down the boundaries of what a user can and can't do.


I'm not sure if there's some kind of plugin or addon that allows us to use HTML, and if there's a way to swap it with CSS. So, I figured I should ask to clear that up.
 
CSS is currently allowed.  Example:


body {
    background-image: url("paper.gif");
    background-color: #cccccc;
}




Those pieces of coding are what can affect other design elements out of a user's post.  A lot of HTML coding is inline, like so:


<p style="background:#000000;">lorem ipsum</p>




I personally recommend using HTML instead of CSS because it seems to cause fewer issues in regard to your personal content.  
 
Huh.. interesting...


I've actually had the opposite effect when playing around with CSS and HTML. But maybe that's just me not understanding how to string it together.
 
Perhaps you can show me some of the coding that you're working with.  I may be able to help you fix any underlying problems.
 
I'm not currently working with anything. I erased all of it when it accidentally changed the background color of the entire website instead of just my post. xD


I was trying HTML, not CSS, at that point.
 
<p sytle="background:#000000;">lorem ipsum</p>




The coding above should work perfectly fine without affecting anything else outside of your post.
 
How would it look if you added more code? Say you wanted a background and borders and tabs?
 
How would it look if you added more code? Say you wanted a background and borders and tabs?

IDK how to do tabs, but to put borders on things, first you use the div function to make a block, and then add style to that block.


<div style="border:1px solid red">
<p style="background: lightblue;">
<span style="color:#ff0000;">something here</span>
</p>
</div>




Also, @ViAdvena made this basic HTML tutorial that you might find helpful OWO
 
I realized this topic got a little derailed. This wasn't really me asking for coding help originally, this was me asking a simple question. xD
 
Not too sure about CSS without html but...


Some people prefer just using inline over CSS due to being more used to a coding format like bbcode where the coding and the written text are basically right next to each other. I honestly feel that CSS is more organized since I'm not forced to read a blob of code on a single line along with the included text, but I think a lot of people just feel that using CSS is confusing (maybe you forgot what oart of your code .Bob was supposed to be)? Also, people who use CSS can still cause their code to affect the website itself by writing something that edits something like the Body of the page?
 
Last edited by a moderator:
o-o I myself don't know how CSS without HTML can work, since as far as I know the function of CSS is to style/decorate the existing HTML element. So for example, if you want to change the color of heading h1 by typing


h1 {color:blue;}


This code will never work if the element <h1> doesn't exist in the html. So in the end you still have to add that element to html code by yourself, which is pretty much what we currently do by writing the html.
 
o-o I myself don't know how CSS without HTML can work, since as far as I know the function of CSS is to style/decorate the existing HTML element. So for example, if you want to change the color of heading h1 by typing



h1 {color:blue;}


This code will never work if the element <h1> doesn't exist in the html. So in the end you still have to add that element to html code by yourself, which is pretty much what we currently do by writing the html.

Not too sure if you meant that you actually use that, but I'd strongly advise you not to directly edit the h1 tag and things like that as you won't be the only person using <h1> on the page. o - o;
 
Not too sure if you meant that you actually use that, but I'd strongly advise you not to directly edit the h1 tag and things like that as you won't be the only person using <h1> on the page. o - o;

If she put a class onto it, everything will still be fine~


You can use CSS, just remember to put classes on things to keep it from affecting other posts or the site itself OWO
 
Necessities method works just fine.  Here's another way:


<p sytle="background:#000000; border:1px solid #000000;">lorem ipsum</p>




I would place your tab coding where 'lorem ipsum' is, if you want your background and border to go around the tabs.  I am unaware of any methods that will customize the tabs.
 
Err, anyway, even if they somehow only allow CSS (basically, using only classes), you won't be able to mess with the page itself (possibly), but you'll certainly be able to mess with other people's posts by using the same class names, although I don't know why someone would do something so malicious. Q - Q
 
Err, anyway, even if they somehow only allow CSS (basically, using only classes), you won't be able to mess with the page itself (possibly), but you'll certainly be able to mess with other people's posts by using the same class names, although I don't know why someone would do something so malicious. Q - Q

Good point.


Yeah, I've seen people suggest using their own usernames as the class, so for someone to indeed mess with their posts, it would have to be a troll targeting that person >.> Which is plain evil and I hope doesn't happen >.<
 
Necessities method works just fine.  Here's another way:



<p sytle="background:#000000; border:1px solid #000000;">lorem ipsum</p>




I would place your tab coding where 'lorem ipsum' is, if you want your background and border to go around the tabs.  I am unaware of any methods that will customize the tabs.

I'm pretty sure that counts as inline?


Edit: When we were discussing css?
 
Last edited by a moderator:
CSS is currently allowed.  Example:



body {
    background-image: url("paper.gif");
    background-color: #cccccc;
}




Those pieces of coding are what can affect other design elements out of a user's post.  A lot of HTML coding is inline, like so:



<p style="background:#000000;">lorem ipsum</p>




I personally recommend using HTML instead of CSS because it seems to cause fewer issues in regard to your personal content.  

Does the code have to be colored ?
 
The benefits of CSS are that you can define classes, such that you only need to edit the class declarations in order to affect multiple tags. Ex:


div.example {
color: red;
}

Code:
<div class="example">This is a test.</div>


Would result in (were I actually able to use HTML/CSS):


This is a test.


It allows you to condense things a bit, if you get what I'm saying. I've been fiddling with CSS/HTML since I started RPing almost a decade ago, so I'm sure I can help you if you have any specific queries. ;)
 

Users who are viewing this thread

Back
Top