Please login or register. Welcome to the Studio, guest!


Quick Links:


newBookmarkLockedFalling

XxDark DjangoxX

XxDark DjangoxX Avatar
The Sun Is In Your Hands......

*
New Member

9


March 2008
For Those New To HTML Let Me Explain Some HTML Attributes and what are they...............
----------------------------
Well Different HTML Tags Can Have Attributes. Attributes provide additional information to an HTML element.
Attributes always come in name/value pairs like this: name="value".
Attributes are always specified in the start tag of an HTML element.


Attributes Example 1:
<h1> defines the start of a heading.

<h1 align="center"> has additional information about the alignment.


Try It Out On A Plain Text Editor Or What You See Is What You Get HTMl Editors but i advise to type it for you to practice HTML tags ^^

Attributes Example 2:
<body> defines the body of an HTML document.

<body bgcolor="yellow"> has additional information about the background color.


I Heard From W3Schools that this was uhhhh..... Deprecated. i dunno where i did red that somewhere :(

Let's Continue!

Attributes Example 3:
<table> defines an HTML table.<table border="1"> has additional information about the border around the table.

A Quote From W3Schools About Using

Use Lowercase Attributes

Attributes and attribute values are case-insensitive. However, the World Wide Web Consortium (W3C) recommends lowercase attributes/attribute values in their HTML 4 recommendation, and XHTML demands lowercase attributes/attribute values.


And Also......

Always Quote Attribute Values
Attribute values should always be enclosed in quotes. Double style quotes are the most common, but single style quotes are also allowed.

In some rare situations, like when the attribute value itself contains quotes, it is necessary to use single quotes:

name='John "ShotGun" Nelson'


Hope You Learned If You Want More Tutorials About HTML,Javascript,PHP,Perl Please Visit:
W3Schools.

Support The Site Too ^^

To Tell You I Hate Javascript Than HTML but really im a nooob there.....please teach me!!!! :-/


Last Edit: Mar 24, 2008 13:34:32 GMT by XxDark DjangoxX
Is The Sun Really My Destiny?

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
Just wanna throw in a few notes to help those out reading this. :)

Attributes always come in name/value pairs like this: name="value".

You will sometimes see examples where this is not the case. In the past, it was acceptable to use certain attributes without a value. For example, some people would just put nowrap in their TD tag because it needed no parameter. That method is now deprecated. The solution now is to set the value equal to the name. So, nowrap="nowrap" would be the correct usage. Even better is using CSS, but that's a different story.

I Heard From W3Schools that this was uhhhh..... Deprecated. i dunno where i did red that somewhere :(

I'm not sure if it is deprecated, but using CSS is most likely preferred to use the built in tag.

In some rare situations, like when the attribute value itself contains quotes, it is necessary to use single quotes:

You can use single quotes any time you want instead of double quotes. You can also us &quot; to insert a quote sign anytime you want to bypass having to use single quotes. So this would work: username="Chris &quot;CD&quot; D" That'd be an example.

Just a few comments I wanted to throw in to help future beginners reading this tutorial. :)

newBookmarkLockedFalling