What is an Attribute in Computer Programming? - Definition & Examples

An error occurred trying to load this video.

Try refreshing the page, or contact customer support.

Coming up next: Automatic Encoding: Definition & Examples

You're on a roll. Keep up the good work!

Take Quiz Watch Next Lesson
 Replay
Your next lesson will play in 10 seconds
  • 0:00 Defining Attribute
  • 0:47 Attribute In Computer…
  • 2:19 Specificity Of Attributes
  • 3:00 Lesson Summary
Add to Add to Add to

Want to watch this again later?

Log in or sign up to add this lesson to a Custom Course.

Log in or Sign up

Timeline
Autoplay
Autoplay
Speed

Recommended Lessons and Courses for You

Lesson Transcript
Instructor: Kenyada McLeod

Kenyada teaches software application, web design and student development courses at a local community college.

In this lesson, we will define the term 'attribute' as it relates to computer programming and provide a few examples. Lastly, you will complete a brief quiz to test your knowledge.

Defining Attribute

Before we delve into attributes in the computer programming sense of the word, let us first define the word 'attribute'. A simple explanation of the term is that an attribute describes something. In computer programming, there are elements, fields, files and other data types that can be manipulated or referenced by way of attributes.

Let's consider this portrait:

Image of brunette woman
Brunette Woman

How would you describe the person in this image? Brunette and attractive are a couple of characteristics that come to mind. These characteristics can also be considered to be attributes.

Now, let's consider this image of a sandwich:

Bacon sandwich photo
Bacon Sandwich

Besides mouth-watering, what are some other attributes that you might assign to this image? So, how exactly does a portrait and a photo of a sandwich relate to computer programming?

Attribute in Computer Programming

In computer programming, there are elements, entities, fields and files that have specific characteristics. For example, in web programming there are elements that are assigned unique attributes. Computer programming attributes describe some characteristic of data whether it be a file, paragraph or field. Let's take a closer look at this.

The language used to render webpages, HTML (HyperText Markup Language), is comprised of various elements, such as paragraph, unordered list and image. These elements represent items that can be displayed on a web page.

The paragraph element includes a specific group of characteristics, or attributes, that it can be assigned. In former versions of the language, one specific attribute of the paragraph element was the align attribute. This attribute could be set to left, right, center or justify. If the attribute is set to right, the paragraph would be aligned to the right when rendered on the page.

To unlock this lesson you must be a Study.com Member.
Create your account

Register to view this lesson

Are you a student or a teacher?

Unlock Your Education

See for yourself why 30 million people use Study.com

Become a Study.com member and start learning now.
Become a Member  Back
What teachers are saying about Study.com
Try it risk-free for 30 days

Earning College Credit

Did you know… We have over 160 college courses that prepare you to earn credit by exam that is accepted by over 1,500 colleges and universities. You can test out of the first two years of college and save thousands off your degree. Anyone can earn credit-by-exam regardless of age or education level.

To learn more, visit our Earning Credit Page

Transferring credit to the school of your choice

Not sure what college you want to attend yet? Study.com has thousands of articles about every imaginable degree, area of study and career path that can help you find the school that's right for you.

Create an account to start this course today
Try it risk-free for 30 days!
Create An Account
Support