ALERT!
Click here to register with a few steps and explore all our cool stuff we have to offer!

Jump to content



Photo

What exactly is the difference between HTML and CSS?


  • Please log in to reply
What exactly is the difference between HTML and CSS?

#1

ReelSquad
ReelSquad
    Offline
    0
    Rep
    0
    Likes

    New Member

  • PipPip
Posts: 11
Threads: 3
Joined: Apr 23, 2019
Credits: 0
Four years registered
#1

Hi.

 

I've been trying out abit of html just to get the feel and stuff, but i'm kinda confused to what css is, because i do see alot of people using that aswell. 

 

So if i could get someone to explain the differences and whats best and stuff like that.

 

Best regards ReelSquad


  • 0

#2

triiempel
triiempel
    Offline
    0
    Rep
    1
    Likes

    Lurker

Posts: 9
Threads: 0
Joined: Apr 24, 2019
Credits: 0
Four years registered
#2

You should use both here is a example how HTML and CSS works.
With HTML you create the structure of your website. With CSS  you can style your website.  
If you want to create a button you use HTML. 
And if you want to make the button yellow you use css. 


  • 1

#3

FaithHF
FaithHF
    Offline
    36
    Rep
    234
    Likes

    SESH

Posts: 408
Threads: 36
Joined: Dec 04, 2016
Credits: 0

Seven years registered
#3

So HTML, at least with modern standards of 4/5, has the capability of using both CSS and Javascript in-line, or in your HTML which is probably why you don't know the difference.

 

So to keep things simple, HTML is how you're formatting data and CSS is how it appears on your screen. And yes, HTML is just a standard language to format data, like text. Anything beyond that is CSS or something that's going on behind the scenes.

 

So consider the following HTML:

<div id="thisDiv" style="width:100px;height:50px;background:#fff" onclick="alert('1')">
    Hello world!
</div>

Simple enough, one HTML element, the div, but it's also employing two other languages: CSS and JS.

 

CSS, like HTML, can't do very much aside from just adding some styling options. In this case, the CSS is included in the style="" property of the div. It hold three things:

width:100px

height: 50px

background (color): #fff (white

This is called inline styling. The style is included in-line with the HTML.

 

The onload="" property holds some Javascript, specifically the alert() function which pops a little dialog up on the screen. It'll have a '1' in it and an OK button.

 

So in that little HTML snippet, we've actually used a total of three languages, one of them being an actual programming language and two being formatting languages/standards.

 

We can take away the inline styling from the HTML and instead have another file that holds CSS data. In its stead, we can have two files in the directory, index.html and style.css. They'll look like this:

 

Style.css:

#thisDiv {
    width: 100px;
    height: 50px;
    background: #fff;
}

index.html:

<link rel="stylesheet" src="style.css"> // Referencing the style.css in the same folder
<div id="thisDiv" onclick="alert('1')">
    Hello world!
</div>

And that's how CSS works. You can do the same with JS for the most part.


  • 0

#4

FranckCastle
FranckCastle
    Offline
    0
    Rep
    12
    Likes

    Night is dark and full of terrors.

  • PipPipPip
Posts: 25
Threads: 0
Joined: May 04, 2019
Credits: 0
Four years registered
#4

We often say that HTML is the carcass of the website and CSS is all what makes this frame more attractive and harmonious. In different words, HTML is used to create the actual content of the page, such as written text, and CSS is responsible for the design or style of the website, including the layout, visual effects and background color


  • 0

#5

mikon159
mikon159
    Offline
    0
    Rep
    0
    Likes

    Member

  • PipPipPip
Posts: 49
Threads: 0
Joined: Feb 14, 2019
Credits: 0
Five years registered
#5

welcome


  • 0

#6

ab1168
ab1168
    Offline
    0
    Rep
    0
    Likes

    New Member

Posts: 10
Threads: 0
Joined: Nov 24, 2018
Credits: 0
Five years registered
#6

Hi.

 

I've been trying out abit of html just to get the feel and stuff, but i'm kinda confused to what css is, because i do see alot of people using that aswell. 

 

So if i could get someone to explain the differences and whats best and stuff like that.

 

Best regards ReelSquad

 

In Simple Way:

HTML is the Building.

CSS is it's color and design.

 

HTML Can Work Without CSS But Looks Ugly.


  • 0

#7

moiz12
moiz12
    Offline
    0
    Rep
    1
    Likes

    Member

  • PipPipPip
Posts: 68
Threads: 0
Joined: May 31, 2019
Credits: 0
Four years registered
#7

html is the basic layout of the website and css is the styling of the website so if you wanted to change a color of something.

idk at least that's what i believe it is


  • 0

#8

mahfas
mahfas
    Offline
    0
    Rep
    0
    Likes

    New Member

  • PipPip
Posts: 11
Threads: 0
Joined: Jun 25, 2019
Credits: 0
Four years registered
#8
Quite simply, HTML (Hypertext Markup Language) is used to create the actual content of the page, such as written text, and CSS (Cascade Styling Sheets) is responsible for the design or style of the website, including the layout, visual effects and background color.

  • 0

#9

hardppin
hardppin
    Offline
    0
    Rep
    0
    Likes

    New Member

Posts: 16
Threads: 0
Joined: Sep 15, 2019
Credits: 0
Four years registered
#9

You could assume HTML is the skeleton of a website and CSS the clothings


  • 0

#10

ustdtx
ustdtx
    Offline
    0
    Rep
    0
    Likes

    New Member

Posts: 23
Threads: 0
Joined: Jul 21, 2019
Credits: 0
Four years registered
#10
Niggas be leeching

  • 0


 Users browsing this thread: