Friday 9 January 2015


LEARNING FROM OTHERS BY VIEWING THEIR SOURCE CODE:

When HTML first came out, a lot of people learned how to create pages by using a handy feature that
you can find in most common browsers: the ability to look at the source code that made the page.
If you go to the View menu in your browser and then look for an option that says View Source or
Page Source, you should see the code that created the page.If you want to see how the author of a page achieved something on a page, this can be a handy technique.

ELEMENTS FOR MARKING UP TEXT:

You now know that an HTML page (also sometimes referred to as an HTML document) consists
of elements that describe how its content is structured. Each element describes what you will find
between its opening and closing tags. The opening tags can also carry attributes that tell you more
about that particular element.Equipped with this knowledge, you can find that much of learning HTML is a matter of learning what elements you can use, what each of these elements does, and what attributes each can carry.

ATTRIBUTE GROUPS:

As you have seen, attributes live on the opening tag of an element and provide extra information about the element that carries them. Many attributes consist of a name and a value; the name reflects a property of the element the attribute describes, and the value is a value for that property. For example, the lang attribute describes the language used within that element; a value such as EN-US would indicate that the language used inside the element is U.S. English.Some attributes consist of only a name, such as required or checked. These are called boolean attributes. To say something is a boolean(“Learning JavaScript”) is to indicate that it can be in one of two states: true or false. For HTML attributes the presence of one of the boolean attributes in a tag indicates that the value is true. So, the following are equivalent:
<input type="text" required >
<input type="text" required="true">
Many of the elements in HTML can carry some or all the attributes you will meet in this section.
At first some of them may sound a little abstract; although, they will make more sense as you see
them used throughout the book. So don’t worry if they do not make much sense at first.In this section, you look at three groups of attributes common to many HTML elements:
➤➤ Core attributes: Including the class, id, style, and title attributes
➤➤ Internationalization attributes: For example, the dir and lang attributes
➤➤ Accessibility attributes: For example, accesskey and tabindex

No comments:

Post a Comment