Week 8
As I’ve continued working towards a larger HTML project, like a website, I have started to get familiar with CSS, a style language applicable to HTML. Similar to HTML, you write CSS in a markup or code software. Besides the technology aspect, which I struggle with, the syntax for CSS is quite simple and can easily be picked up by beginners.
I have not fully developed my HTML document yet so I have not had much practice in applying the CSS, but Carrie Dils’, CSS Fundamentals, course on LinkedIn gave lots of guidance on using CSS in HTML documents.
To make it more digestible, CSS stands for cascading style sheets. CSS is a coding language which only affects style by controlling the appearance of markup languages like HTML. As my title suggests, there are lots and lots of options for stylization when using CSS, and by no means am I a style guru. But, from watching and taking note on the CSS Fundamentals, and attempting to apply it in my documents, I at least understand a few important things:
Cascading Style Sheets?
When adding CSS to your markup documents, it’s important to understand the way CSS operates; hint, it’s in the name. When your CSS is being read in a document the CSS at the “bottom” of your code will be the applied code; i.e. if there are two commands for heading color with one command lower than the other, the bottom-most code will apply.
This also depends on other factors, the most relevant factor being specificity. Dils explains that the most specific codes will be the codes and appearance reflected in the HTML document and if there are two commands at the same level of specificity, the bottom-most one will be chosen.
Best Practices for CSS
- The more context the better, both for CSS and HTML, the more specific the information the better the document.
- Use consistent HTML, the tags/commands for elements needs to be concise for easy CSS application.
- Use comments liberally; I take this as don’t be afraid to guide yourself.
- For easy to read style sheets, group similar styles together (like heading styles/font styles).
Customization Galore
With CSS, you can basically customize anything you want in a markup document. There are lots and lots of things to customize but before I start my list you should know once you get more familiar with CSS you can do all kinds of formatting and design stylization, however I am not familiar enough with that CSS to give guidance on it. That out of the way, the more simple forms of stylization includes things like; headings, their size, font, color, outline; text, font, color, size; size of pictures, their filters, borders; and lots more.
I know this is a lot of info to take in, but CSS’s syntax is quite beginner friendly. When trying out CSS for yourself, w3schools is a great resource for any CSS example or tool you need.
Leave a Reply
You must be logged in to post a comment.