I want to ask how to break the body tag into classes in order to apply one style to one part of the text and another to another part of the text?

    2 answers 2

    body - the root element of the display part of the html document, your question is incorrect ... As for the parts of the text - the scheme is the same as deamondz , only instead of the div tag we use span
    For example:

     <style type="tex/css"> .red {color:red} .bold {font-weight:bold} .italic {font-style:italic} </style> <span class="red"> Красный текст <span class="bold"> тут еще и жирный </span> <span class="italic"> а тут курсив </span> </span> 

    PS: naturally an abstract example and styles can be described as you like

      html:

       <body> <div class="class_1">content</div> <div class="class_2">content</div> </body> 

      css:

       .class_1{anystyle:any_property} .class_2{anystyle:any_property}