Tags, Elements & Attributes
Lessons Covered


One of the very first lessons of HTML require you to have an understanding of what html tags, elements and attributes are. So the question arises, what are they ?



Tags

Tags can be considered to be a label. It is used to mark the start and end of a element. Some common tags include the html tag <html>, the anchor tag, <a> and the paragraph tag, <p>. You will be exposed to them all as the tutorials progress.

Each tag which is opened should be closed after you are finished with it. A closed tag looks similar to an opening tag with the exception of a back slash, ( / ) which preceeds the tag name. The closing tag for <html> would thus be </html>.

The table below lists some of the most common ones. Throughout the tutorial as you are exposed to other tags they will be explained to you.

Some Examples of the Most Used Tags

Tag Example of Use Purpose of Tag
Anchor <a> ... </a> Used to define a link.
Body <body> ... </body> * Used to define the body of a html document.
Break <br> or <br /> Provides a line break.
Comment <!-- Comment--> Used to comment your html document, this cannot be seen by the person viewing your web page.
Division <div> ... </div> Defines a specific section.
Emphasis <em> ... </em> Emphasis This is the same as italised text.
Form <form> ... </form> Used when creating a form.
Head <head> ... </head> * Contains the title tag.
Html <html> ... </html> * Used to define an html document.
Paragraph <p> ... </p> Used for paragraphs.
Strong <strong> ... </strong> Used to bold text.
Title <title> ... </title> * Defines the title of your webpage.

* denotes an important tag.


Element

An element consists of everything from the start tag to the end tag.


Example:

<p> An Element </p>

In the above example the element is everything from the opening paragraph tag, <p> to the closing paragraph tag </p>.


Attributes

Attributes are used to define a specific feature of an element. Look out for these as we progress throughout our tutorials.

Example:

<a src="www.new2html.com title="HTML Website"/>

In the example above src and title are attributes of the anchor element <a>





Just simple definitions to get you started. You will get a clear understanding of these as we progress. Now you are ready to go.


Previous Lesson Previous Lesson - Whats Needed                             Next Lesson - The Basics Next Lesson