HTML

html is fun. learn it. stop thinking about rocket league. ill tell some html tags on this page


Table of contents:

Writing:

many tags are used for writing. some are:


P tag:

p tag starts a new line when it starts. it can be used to write paragraphs. E.g:

i am in a p tag

i am in another p tag

notice the new line in these two p tags

span tag:

span tag is the opposite. it doesnt start a new line when it starts. many span tags can be written, but the output wil be in one line. E.g:
each of these letters are written in a span tag
a a a a a a a a

notice they are all in the same line
the code behind the spans is this:


Heading tags:

heading tags are, obviously, used for heading.

h1 tag:

I am a Heading

h2 tag:

I am another Heading

h3 tag:

I am another Heading

h4 tag:

I am another Heading

h5 tag:
I am another Heading
h6 tag:
I am another Heading

Disappointed because the tag with a bigger number is the smallest? I was, too, but now i ignore it. you should, too :D


Styling tags; Bold Italic or Underline:

I am in bold! Hurray! (b tag)
I am in italic! Hurray! (i tag)
I am underlined! Hurray! (u tag)

tags can be used in one another to produce a combined effect:
I am bold, italic and underlined!!

the code behind the above is this:

Point to note!

The styling tags bi and u tags behave like span tags. like span tags, they dont start a new line either.


The Div Tag:

the div tag isnt used for writing, but rather they are used for containing stuff. div tags are used as containers: meaning they arent anything of their own.

in writing, the div tag behaves exactly like the p tag. but developers always use it as containers, since div is an abbreviation for division.

the point to note above was created using the div tag:


ignore the "class", its a css thing. only focus on the fact that the the div tag wraps the point to note box.

Point to note for dumb people: how to write a tag?

there is a chance that you dont know how to write a goddamn tag and are still reading all this (or maybe randomly jumped on this seciton?). anyway.

writing tags is easy. all you have to do is put a <, then the name of the tag, then >. This starts a tag. Like:

<span>

a span tag has opened

cool, now you know how to open tags. but what to do with it? like, you have a tag, what do you do with that tag? lick it?

absolutely yes- i mean no. when tags open, tags close too (mostly, unlike <br> tag). How to end a tag? Simple:

</span>

a span tag has been closed now

so what? what do you do with this? it doesnt produce any output :/

add some text in it:

<span>hello</span>

Congrats! Now you know how to write a tag!


Tags that dont need to end; standalone tags:

A few of the, are:

Point to note: Whats so special in standalone tags?

Standalone tags have only one difference: they dont need to end like </span>. You type <br> only, and the tag does its job.


hr tag:

Simple. like really:


this line was produced with the <hr> tag.

Point to note: Sorry, HTML ignores your enter key

Did you try to add a new line using the enter key, but failed?
the reason: html ignores enters.
the solution: use br tag as demonstrated below


br tag

Simple:


the line break tag is written, but isnt visible because there was nothing in between, a better demonstration would be using it in between some text:

I am
some text

notice the new line in between. even though this is a single span, the br tag was able to break the line.

the code behind is:


img tag

Probably the most interesting tag on the whole page: the img tag.

Syntax:

where path is the full path of the image

the img tag can display an image from the internet or locally. Loading an image from the internet:

the code behind is:



to display an image locally, you need it placed with the html you are working on.

if the image is in a folder, you need to give the folder name too like:

The image extension is important!

Still not amazed? Try the a tag:

yes. its a tag. what does it do? you can create a link with it :D!

a tag is not a standalone tag, it needs to be ended. its syntax is:

where path is path of the page you want to link.

like the img tag, the a tag can also use local or online pages.


Click me to go to a page!
Local page/file:

Online page/file:

Point to note; attributes:

Attributes are the properties we give to tags, like the src attribute, or the href attribute. All tags can have attributes, but i have discussed related attributes only.