Good evening,
Lately, I've been delving into the world of HTML and CSS to better understand them.
I'm currently working on incorporating a dynamically changing quotation from a database of famous quotes into my HTML. While I have everything set up to display the quote, I want to add some unique CSS styling to it using a more "programming-y" approach.
Here's what I have in mind:
- Define a
.dailyquote{}
class in the CSS file. - Insert the quote in the HTML as:
<div class = "dailyquote"> Quote_text#Quote_Author</div>
- Utilize CSS to display the Quote_text until it reaches # and then apply styles specifically to the author part of the content, such as
float:right
or adjusting font size. Keep HTML simple with minimal markup while handling styling predominantly through CSS.
The challenge is that I'm not quite sure how to implement this functionality purely in CSS. As a programmer by background, I believe I might need some sort of loop structure and conditional statements like an if() condition.
Is achieving this level of sophistication in CSS possible, or am I mistakenly treating CSS as a full-fledged programming language when perhaps I should be focusing more on HTML?