Avicus Archive

HTML/CSS heeeeelp by Robin_DD_J August 20, 2015 at 7:08 PM UTC

Alright so, trying to learn myself some html/css via a website. But there is this things that is called "<div>" and <div class="#"> which I understand is some kind of section thing. But could someone who is used to HTML work and CSS explain to me how I can use this and so on? Explain how it work.

My first language is not english, so try to keep it as simple as possible because I'm learning.
Thank you.

Numberz_ August 20, 2015 at 7:08 PM UTC

I'm not the best with HTML but from what I know the "<div> tags are like dividers which can be used to make different sections in the HTML. They can also be used with the <pre> tags to make backgrounds and stuff.

Javipepe August 20, 2015 at 7:08 PM UTC

Divs are just groups that get grouped because they have something in common, their style. The classes of a div are css styles put together referenced from a single word. 

You set a class in css like this:

.potato{
  background:transparent;
  margin-top:2em;
  border: 1px solid #ddd;
}

And then from the html

<div class="potato">hey have a potato<br><img src="potato.png"></div>

That group of things' style would be inherited from the parent div. 

Hopefully that is clear enough

AtditC August 20, 2015 at 7:08 PM UTC

Dude, buy a HTML and CSS book. They are good.