Is there a difference between HTML and CSS link codes?

  • Thread starter Thread starter alexrenee//?
  • Start date Start date
A

alexrenee//?

Guest
are there different codes for each one or are they the same.
and if they are different, what is the CSS code?
 
Yes, a huge difference. You're comparing apples to oranges. HTML is a markup language. It's what a browser uses to render a page. If you right click on any web page and click 'view source' you will see the page's HTML structure. CSS, on the other hand, works in tandem with HTML to control a page's look and feel. CSS controls things like font styles, background colors, images and other browser related components. I recommend the two links below for further reading and understanding.
 
Yes they are different languages with different formats - html structures a page in order of where you put the codes, such as table and div layers, where as css does not have a particular order - you just address the element through the proper syntax.

Rather than spend a lifetime explaining something in context you won't understand, I'll just give an example of CSS and HTML.


HTML \/


<div style="text-align:center; overflow:hidden;">
<table><tr><td>
<marquee direction="left" behavior="scroll">
words and more words
</marquee>
</td><td>

words here

</td></tr></table>
</div>



CSS \/


<style>
div table td {width:240px;}
</style>



See the relationship though? I added in one div layer and one table layer using html, then i used css to address the table's cell (or TD) using css - and adjusted it's width. You can also assign classnames to address a specific element, when you are using multiple tables on the same level and don't want your css to affect all of them.
 
Back
Top