I have multiple classes within the p tag, but I am not sure how to specify that I want to edit a certain class. These are someone of the lines that I have that need to be edited differently.
enter image description here
I need to make the first 2 lines into sans-serif.
What can I do to fix this confusion?
3
Answers
I don’t quite understand the question. If you’re asking how to select an HTML element with a certain class within CSS, you can use class selectors. For example, the first two paragraph elements in your code have two different classes: "stageDirection" & "actor".
To select them in CSS, you would enter this:
If you want to give different css effect in a paragraph, you can select those lines into a
<span class=""></span>
tag with you customized class name in the class attribute. And write your css codes accordingly.For sans-serif text use
font-family: sans-serif;
If you want to apply styles to a specific class of
p
tag, you should create/open .css file or write between<style></style>
in html and write there:p.stageDirection
means that styles should be applied top
tag with classstageDirection