Malioglasnik.com.hr

[ New messages · Members · Forum rules · Search · RSS ]
  • Page 1 of 1
  • 1
HTML - Attributes
BassoDate: Thursday, 2010-12-09, 12:50 PM | Message # 1
Group: Moderator
Messages: 1637
Awards: 2
Reputation: 695
Status: Offline

HTML - Attributes


Attributes are used to amplify tags. What we mean by amplify is that when a web browser interprets a tag, it will also search for set attributes and then display the element (tags+attributes) in its entirety. At some point you may want to give your body element a background color or perhaps change the width of a table. All of these things and more can be achieved using Attributes.


Many HTML tags have a unique set of their own attributes. These will be discussed as each tag is introduced throughout the tutorial. Right now we want to focus on a set of generic attributes that can be used with just about every HTML Tag in existence.


Attributes are placed within the opening tag and they follow a precise syntax (format).

 
If you have a problem about Intellectual property rights violation,

Please Contact Us we remove all content within 24 hours.



BassoDate: Thursday, 2010-12-09, 12:52 PM | Message # 2
Group: Moderator
Messages: 1637
Awards: 2
Reputation: 695
Status: Offline

HTML - Class or ID Attribute


The class and id attributes are nearly identical. They play no direct role in formatting your elements but rather serve behind the scenes for scripting and Cascading Style Sheets (CSS). The role of classification and identifying elements will become more apparent as your learn CSS.


The idea is that you can classify or id certain a tag and later format the tag using Cascading Style Sheets. It becomes necessary when you have two or more of the same element on a page (like a

tag) but want them to be different in appearance.


HTML Code:


Code
<p id="italicsparagraph">Paragraph type 1 Italics</p>
<p id="boldparagraph">Paragraph type 2 Bold</p>


Classification Attributes:


Paragraph type 1 Italics
Paragraph type 2 Bold

 
If you have a problem about Intellectual property rights violation,

Please Contact Us we remove all content within 24 hours.



BassoDate: Thursday, 2010-12-09, 1:05 PM | Message # 3
Group: Moderator
Messages: 1637
Awards: 2
Reputation: 695
Status: Offline

HTML - Name Attribute


Name is much different than id and class. By allotting a name to an element, that name becomes a scripting variable for scripting languages such as Javascript, ASP, and PHP. The name attribute is seen most often with forms and other user-input elements.


HTML Code:


Code
<input type="text" name="TextField" />








This attribute has no effect on the display of the text field, but behind the scenes it plays a huge identification role.

 
If you have a problem about Intellectual property rights violation,

Please Contact Us we remove all content within 24 hours.



BassoDate: Thursday, 2010-12-09, 1:15 PM | Message # 4
Group: Moderator
Messages: 1637
Awards: 2
Reputation: 695
Status: Offline

HTML - Title Attribute


This is a neat little perhaps, forgotten attribute. This attribute titles an element and adds a tiny text pop-up to any HTML element. Much like the text pop-ups of word processing programs, these attributes should not be forgotten. You may title an element anything you would like, the effects of this attribute are not seen until you hover your mouse over the element for a few seconds.


HTML Code:


Code
<h2 title="Hello There!">Titled Heading Tag</h2>


Title Attribute:


Titled Heading Tag


Hover your mouse over the display heading to see the magic of the title attribute! This provides your web site with some user interaction which is priceless. Do not overlook the title attribute.

 
If you have a problem about Intellectual property rights violation,

Please Contact Us we remove all content within 24 hours.



BassoDate: Thursday, 2010-12-09, 1:21 PM | Message # 5
Group: Moderator
Messages: 1637
Awards: 2
Reputation: 695
Status: Offline

HTML - Align Attribute


If you wish to change the horizontal location of your elements you may do so using the align attribute. You may align things left, right, or center. By default most elements are automatically aligned left unless otherwise specified.


HTML Code:


Code
<h2 align="center">Centered Heading</h2>


Display:


Centered Heading



HTML Code:


Code
<h2 align="left">Left aligned heading</h2>

<h2 align="center">Centered Heading</h2>

<h2 align="right">Right aligned heading</h2>


Display:


Quote

Left aligned heading

Centered Heading

Right aligned heading

 
If you have a problem about Intellectual property rights violation,

Please Contact Us we remove all content within 24 hours.



BassoDate: Thursday, 2010-12-09, 1:24 PM | Message # 6
Group: Moderator
Messages: 1637
Awards: 2
Reputation: 695
Status: Offline

Attribute Defaults


Many tags are assigned default attributes. This means that unless a tag attribute is specified by you the creator, it will have some distinct attributes. For example, a paragraph tag will always align its text to the left unless it has an align attribute in it specifying otherwise. Also elements placed within a table are vertically centered and to the left unless otherwise specified. As you code and learn about each of the different HTML elements, you will become aware of many of these defaults.

 
If you have a problem about Intellectual property rights violation,

Please Contact Us we remove all content within 24 hours.



BassoDate: Thursday, 2010-12-09, 1:31 PM | Message # 7
Group: Moderator
Messages: 1637
Awards: 2
Reputation: 695
Status: Offline




















































Attribute Options Function
align right, left, center Horizontally aligns tags
valign top, middle, bottom Vertically aligns tags within an HTML element.
bgcolor numeric, hexidecimal, RGB values Places a background color behind an element
background URL Places an background image behind an element
id User Defined Names an element for use with Cascading Style Sheets.
class User Defined Classifies an element for use with Cascading Style Sheets.
width Numeric Value Specifies the width of tables, images, or table cells.
height Numeric Value Specifies the height of tables, images, or table cells.
title User Defined "Pop-up" title for your elements.


Attributes exist to modify HTML tags allowing for complete customization of a website. Here's a table of some other attributes that are readily usable with many of HTML's tags.

 
If you have a problem about Intellectual property rights violation,

Please Contact Us we remove all content within 24 hours.



BassoDate: Thursday, 2010-12-09, 1:31 PM | Message # 8
Group: Moderator
Messages: 1637
Awards: 2
Reputation: 695
Status: Offline

Tips


* Use several different attributes to enhance a tag.
* Completely customize your site through various tag/attribute combos.
* Use the title attribute!

 
If you have a problem about Intellectual property rights violation,

Please Contact Us we remove all content within 24 hours.



  • Page 1 of 1
  • 1
Search:
Forum Advice
Security advice: Protect your identity when downloading!
Your real identity and ip address is visible while downloading. These days, everyone's looking to throttle your connection, spy on what you're downloading, or even send you an ominous letter. If you use BitTorrent, you absolutely need to take precautions to hide your identity. An easy and raliable solution is a VPN by hide.me. Hide.me doesn't store any logs and offers blazing fast connections.Hide.me VPN is trustedby more than 500.000 internet users worldwide and recommended by Brna.my1.ru.