Question:

What are four attributes that can be applied to an HTML element? And codes if you know them please! :o)

by Guest61023  |  earlier

0 LIKES UnLike

I need some examples. Thanks

 Tags:

   Report

1 ANSWERS


  1. Here's 4: (I've capitalised them but they are usually used in lower case)

    ID: id gives the element a name that can be used to refer to a collection of CSS style properties and also to reference with the javascript getElementById("divName"): should only be used once on a page

    <div id="divName"> . . . </div>

    CLASS: class is very similar to id, but can be used more than once for a number of different elements with the same style; can also be used in conjunction with other style classes:

    <p class="paraStyle"> . . . </p>

    <p class="pa pb"> . . . </p>

    TITLE: title gives you the opportunity to create a small pop-up description when you hover over the element: the text specified will appear on hover

    <img source="imageName.ext" title="A View of Main Street in Timbuktoo">

    STYLE: style allows you to insert CSS properties in the tag itself:

    <p style="font:12px arial bold; color:red;"> . . . </p>

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.