What is the difference between HTML and CSS? Can YOU help me to edit the size

  • Unknown's avatar

    I’m feeling stupid, cause I do not understand this.
    What is the differences between HTML and CSS?
    I used blogspot before, and had no problems to understand how to change the colors, pictures, backgrounds, fonts, sizes and so on, but CSS seems so much harder…

    I just want to change the size of the column where i write (from 400 px to 560 px). I know I have to buy an upgrade to do this, but I would like to understand what i am doing before I do so.

    Are there anyone that know how I do this? :)

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Googling your question would have returned lots of links with an explanation, but here’s what I hope to be a simple one (I’ll do my best to explain this as best as I can)…

    HTML is the markup language that makes a web page. The markup contains elements. Example:

    <div></div>
    <span></span>
    <h1></h1>
    <img />
    etc.

    CSS is what styles the elements in the markup. To style those elements, CSS uses “selectors”.

    There are three types of Selectors:

    Element Selectors
    ID Selectors
    Class Selectros

    Element Selectors are those that target (or “select”) elements by their tag name. Example:

    div {
         ...
    }
    
    span {
         ...
    }

    ID selectors are those that target (or “select”) elements by their ID attribute. For instance, you have this in your markup:

    <div id="container">
         .......
    </div>

    You’d target this “div” tag through its ID attribute whose value, in this case, is “container”. So the selector in the CSS would be this:

    #container {
         ...
    }

    Notice that ID selectors start with a “pound” sign.

    Class Selectors are those that target elemens by their “class” attribute. Example:

    <span class="bigText">text</span>

    The “span” tag has a “class” attribute whose value is “bigText”, so to style that element you’d write your CSS like this:

    .bigText {
         ....
    }

    All Class Selectors start with a dot.

    Class Selectors are ideal if you want various elements to have the same properties. So, for instance, if you wanted to have a couple of words bigger than the rest of the text, you’re markup should look something like this:

    <p>Hello, I am <span class="bigText">happy</span> to be <span class="bigText">here</span></p>

    and your CSS like this:

    .bigText {font-size: 2em;}

    When the text is rendered by the browser, the words “happy” and “here” would be bigger than the rest of the text.

    That’s about it… hope this helps.

  • The topic ‘What is the difference between HTML and CSS? Can YOU help me to edit the size’ is closed to new replies.