|
HTML Home
Create a Website HTML TutorialHTML Tutorial HomeAbout HTML Getting Started HTML Elements HTML Formatting HTML Attributes HTML Colors HTML Links HTML Images HTML Meta Tags HTML Comments HTML Forms HTML Tables HTML Image Maps HTML Frames HTML Entities HTML Layouts HTML Styles HTML Scripts HTML Website Templates Website Hosting Summary HTML Code GeneratorsHTML Code GeneratorHTML Table Generator Marquee Generator Music Code Generator HTML Text Generator Text Box Generator Free HTML CodesHTML Background CodeHTML Comment Box Codes HTML Scroll Box Codes HTML Font Codes HTML Picture Codes HTML Marquee Code HTML Music Codes HTML Templates More Codes... HTML ReferenceHTML ExamplesComplete HTML Tag List HTML Special Characters Hex Color Codes HTML Help FREE Hosting!With every domain name you register with ZappyHost, you get FREE hosting.PLUS you get:
|
HTML AttributesHTML tags can contain one or more attributes. Attributes are added to a tag to provide the browser with more information about how the tag should appear or behave. Attributes consist of a name and a value separated by an equals (=) sign. Consider this example:
<body style="background-color:orange">
style="background-color:orange", tells the browser to style the body element with a background color of orange.
WidthHere's another example of adding an attribute to an HTML tag:
<hr width="60%" />
This results in: AlignmentYou can align HTML elements to the left, right, or center:
This results in: Aligned leftAligned centerAligned rightMany attributes are available to HTML elements, some are common across most tags, others can only be used on certain tags. Some of the more common attributes are:
You don't need to fully comprehend these just yet. The good thing about attributes is that, generally, they are optional. Many HTML elements assign a default value to its attributes - meaning that, if you don't include that attribute, a value will be assigned anyway. For example, if you don't specify the alignment for the You will see more attributes being used as we cover off some of the more advanced HTML elements. Enjoy this website?
Oh, and thank you for supporting Quackit! |
Need Content for your Website?Get unique, quality digital content for your website. You can even earn money by reselling it!Includes:
|