Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

HTML & CSS TUTORIAL - #2 - ELEMENTS PART 1 OF 2

THIS POST WAS ORIGINALLY POSTED ON http://megabg.com/showthread.php?tid=46 BY ME 5 MINUTES AGO. PLEASE TELL ME IF THIS VIOLATES THE RULES TO POST ON BOTH FORUMS.

[img]http://oi66.[censored].com/v5y6ti.jpg[/img]


There are lots of elements in one HTML page, for example:
[Image: html-elements.png]

From the above example, you can see "<ul>", "<h1>", "<p>", those are examples of elements in HTML. It may seem hard to learn to you, but don't worry, we will go through it 1 by 1.

1. Heading Elements (h1 ,h2, h3, h4, h5, h6)
Headings are described by heading elements. There are six levels of heading elements: h1 to h6. The h1 element is used to describe the main heading of the page.

For example,
Code
<h1>This is a h1 heading</h1>
<h3>This is a h3 heading</h3>

Will lead to,
This is a h1 heading
This is a h3 heading


2. Paragraphing Elements (p)
Paragraph of text are usually followed by the heading. <p>

For example,
Code
<p>This is a paragraph text</p>

Will lead to,
This is a paragraph text

We will also learn how to bold, underline, etc. In the later tutorials.


3. Link Elements (a)
The defining feature of the Web is the presence of links. Clicking on links leads to other web pages. The a element is used to create links.<a> is a little bit more complicated than other elements, it has attributes (href).

You will understand how to use it by looking at the following examples.
Code
<a href="http://www.google.com">A link to Google.com</a>

Will lead to:
A link to Google.com


4. Image Elements (img)
In addition to headings and paragraphs, a web page can have images. The img element is used to add images to a page. The img element has an attribute inside the opening, src, which is the link to the image.

For example, 

Code
<img src="http://megabg.com/images/smilies/sleepy.png"></img>


Leads to,
[img]http://megabg.com/images/smilies/sleepy.png[/img]

[img]http://oi67.[censored].com/2wdsqy8.jpg[/img]


In the next tutorial, we will cover more HTML elements.


Possibly Related Threads...
Thread / Author Replies Views Last Post
by HackersSep 28, 2026 01:50 PM 9 364 Sep 28, 2026 01:50 PM
Last Post: JuWacky
by oxagastSep 3, 2022 07:52 AM 0 197 Sep 3, 2022 07:52 AM
Last Post: oxagast
by AerrowsGirlfriendJun 16, 2021 04:17 AM 1 319 Jun 16, 2021 04:17 AM
Last Post: Nachfolger