Course Hero Logo

Ali ol the mark element doesnt attach any importance

Course Hero uses AI to attempt to automatically extract content from documents to surface to you and others so you can study better, e.g., in search results, to enrich docs, and more. This preview shows page 69 - 72 out of 100 pages.

</a></li></ol>Themarkelement doesn’t attach any importance to the con-tent within it, other than to show that it’s currently of interest.As the specication says,markdenotes “a run of text in onedocument marked or highlighted for reference purposes, dueto its relevance in another context.”Themarkelement is permitted in contexts other than searchresults, but we’re hard-pressed to think of an example.timehCalendar is one of the most popular microformats because itscratches a very common itch: marking up events so that userscan add them straight to their calendar.The only tricky bit in hCalendar is describing dates and timesin a machine-readable way. Humans like to describe dates as“May 25th” or “next Wednesday,” but parsers expect a nicelyformatted ISO date: YYYY-MM-DDThh:mm:ss.
HTMLFOR WEB DESIGNERS64The microformats community came up with some cleversolutions to this problem, such as using theabbrelement:<abbr class="dtstart" title="1992-01-12">January 12th, 1992</abbr>If using theabbrelement in this way makes you feel alittle queasy, there are plenty of other ways of marking upmachine-readable dates and times in microformats using theclass-valuepattern. In HTML, the issue is solved with thenewtimeelement:<time class="dtstart" datetime="1992-01-12">January 12th, 1992</time>Thetimeelement can be used for dates, times, or combina-tions of both:<time datetime="17:00">5pm</time><time datetime="2010-04-07">April 7th</time><time datetime="2010-04-07T17:00">5pm on April 7th»</time>You don’t have to put thedatetimevalue inside thedatetimeattribute—but if you don’t, then you must expose the value tothe end user:<time>2010-04-07</time>meterThemeterelement can be used to mark up measurements,provided that those measurements are part of a scale withminimum and maximum values.<meter>9 out of 10 cats</meter>
65SEMANTICSYou don’t have to expose the maximum value if you don’twant to. You can use themaxattribute instead:<meter max="10">9 cats</meter>There’s a correspondingminattribute. You also gethigh,low, andoptimumattributes to play with. If you want, you caneven hide the measurement itself inside avalueattribute.<meter low="-273" high="100" min="12" max="30"»optimum="21" value="25">It's quite warm for this time of year.</meter>progressWhilemeteris good for describing something that has alreadybeen measured, theprogresselement allows you to mark upa value that is in the process of changing:Your profile is <progress>60%</progress> complete.Once again, you havemin,max, andvalueattributes if youwant to use them:<progress min="0" max="100" value="60"></progress>Theprogresselement is most useful when used in combina-tion with DOM scripting. You can use JavaScript to dynamicallyupdate the value, allowing the browser to communicate thatchange to the user—very handy for Ajaxle uploads.

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 100 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Spring
Professor
Luke Papademas
Tags

Newly uploaded documents

Show More

Newly uploaded documents

Show More

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture