Div class

I have a question and I need some help, when a div class is created , it can contain any type of name or it is something strict , for example I would like to create a < div class=“story” will this interfere with the main.css if I want to edit it later in css? Sorry maybe it is a dumb question but I am Romanian , and not perfect at English I need to ask.

The class name of a div can be any name you want.

However, you’ll want to be careful to give specific class names, in order to avoid conflictual names between different divs (if you’re not careful).

If you use the same class name on different divs (which is common practice), all divs with the same class will obviously have the same properties.



  <div id="title_block"></div>

  <div class="blog_entry">
    <div class="story"></div>

  <div class="blog_entry">
    <div class="story"></div>


This is why you’ll have to be careful when you edit your CSS. You could get unwanted results if you weren’t careful with your HTML structure and class/ID naming in the first place.


Thank you for the help :slight_smile:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.