Search
 
SCRIPT & CODE EXAMPLE
 

CSS

how to add a class to a paragraph in css

<!--This text will teach u to add inline and internal CSS -->

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>


    <!-- internal css -->
    <style>
        p.example
         {color:khaki ;}
    </style>
    <!-- internal css -->


</head>
<body>

    <h3>Helllooooo</h3>


    <!-- inline css -->
    <span style = "color:mistyrose; background-color: coral;"> Text shown in mistyrose and with a coral background</span>
    <!-- inline css -->


    <!-- internal css implementation -->
    <p class = "example"> This text is in color</p>
    <!-- internal css implementation -->
    
</body>
</html>

<!-- Refer line 27 to get a understanding of using inline CSS  -->

<!-- So for internal css you have to first make a class and
then add that class in your style tag so that it knows which 3
paragraph or span or whatever tag to act upon -->

<!-- The way to make a class in paragraph or whatever is before 
the closing angular bracket u should add class = "your_classname" followed by
closing angular bracket -->

<!-- and in the style block you have to add it using a period (period = .)
followed by your class name -->

<!-- Refer lines 14 and 32 for internal CSS -->

<!-- -->
Comment

PREVIOUS NEXT
Code Example
Css :: read properties from css file 
Css :: css jagged edges 
Css :: how to round the corners of a div outline in css 
Css :: easiest way to invert css to dark mode 
Css :: Warning: Failed child context type: Invalid child context `virtualizedCell.cellKey` of type `number` supplied to `CellRenderer`, expected `string`. 
Css :: How to make a round corner in CSS 
Css :: css grid minmax function 
Css :: border properties css 
Css :: transition background gradient 
Css :: css grow 
Css :: html disable spin buttons on input type number 
Css :: html5 input required length 
Css :: css backdrop filter blut 
Css :: css selection 
Css :: all.min.css cdn 
Css :: css opacity example 
Css :: how to middle fixed element 
Css :: css strikethrough html text 
Css :: prevent css animation reset 
Css :: css show scrollbar if overflow 
Css :: normalize css npm 
Css :: css animate border 
Css :: css transform translate rotate 
Css :: css div content horizontal scroll 
Css :: css right 
Css :: remove scrollbar from select tag 
Css :: bootstrap card hover effect 
Css :: css bold 
Css :: center block div 
Css :: css move animation 
ADD CONTENT
Topic
Content
Source link
Name
9+9 =