Tuesday, May 13, 2014

HTML Attributes

// // Leave a Comment

What is an attribute?


As you probably remember, elements give structure to a HTML document and tells the browser how you want your website to be presented (for example,<br /> informs the browser to make a line break). In some elements you can add more information. Such additional information is called an attribute.
Example:
HTML links are defined with the <a> tag. The link address is specified in the href attribute:
<!DOCTYPE html>
<html>
<body>
<a href="http://www.developersplatform.byethost5.com">This is a link</a>
</body>
</html>
Below is a list of some attributes that can be used on any HTML element:

Atttributes
Description
Class Specifies one or more classnames for an element (refers to a class in a style sheet)
Id Specifies a unique id for an element
Style Specifies an inline CSS style for an element
Title Specifies extra information about an element (displayed as a tool tip)

0 comments:

Post a Comment