html codes , colour, font, size ect?

Dude

New member
ok well i want to lean a bit about html the thing is when i go on google it does not igive me the information i desire.

it tells me colour codes for htlm and html

but what i want to know ... is how to structure an htlm so i can write anything i want in any colour i want and size or font

like e.g. <html= type something here anything you want = html>

how do i get the html like that? so i cane start it and then write anything i want in the middle and then end the tag...

because everything i get it like
<a style="color:#80BFFF"> and when i add it to my chatango profile it doesn;t exactly work.
 
First of all, its only HTML. No such thing as HTLM!


There are thousands of HTML tutorials on the internet. I suggest you read through this one...
http://www.w3schools.com/html/

It would probably also help to learn CSS...
http://www.w3schools.com/css/


Apart from some exceptions, HTML tags always have to be opened and close. They are hierarchical, so you can't 'overlap' them. Tags have to be nested within each other.

e.g.

<div><p>hello</p></div>

...would be ok, whereas...

<div><p>hello</div></p>

...is not ok.


In newer specifications, i.e. XHTML, some tags can be self-closing. This means that you don't have to pair them up. An example of the IMG tag, which in XHTML can be written like...

<img src="..." alt="..." />

(without needing the closing </img> because you've 'self-closed' it with />)
Note that the XHTML spec states you always need alt attributes for the IMG tag, hence why I included it.



You used to change font styles using tags like...

<font size="12pt"> hello </font>

...however this is now considered an old-fashioned and clumbsy way of doing things.


Most webpages are styled with CSS (cascading stylesheets) nowadays, which separates the content from the design.

Most page design is done using basic DIV and P tags, which are then styles using CSS.

CSS can be targeted at specific object IDs, classes, or elements (or more complicated mixtures of the two).

i.e. to style the element...
<div id="test"> hello </div>

You would use the CSS...
#test {
CSS STYLING GOES HERE
}


<div class="test"> hello </div>

...would be...

.test {
}


Or you could apply a style to all DIV elements...

div {
}


...or all div elements in the class 'test'...

div.test {
}


I'm getting a bit carried away here!

Basically, learn CSS. It will help...
 
Back
Top