Tải bản đầy đủ - 0 (trang)
Chapter 6. Creating Text-Based HTML Auction Templates

Chapter 6. Creating Text-Based HTML Auction Templates

Tải bản đầy đủ - 0trang

CreatingSimpleTextDescriptions

Fornow,I'llassumethatyoucaninsertsimpletextformatting

commands,likeorforboldfaceororfor

italic.Youcanusethesesimpletagstohighlightimportant

wordsandphraseswithinyourmaindescriptiontext.

Thatassumed,we'lljumprightinandcreatesometext

descriptions(notitlesyet)withverysimpleformatting.



Template6.1.CenteredText



We'llstartwithaverysimpleall-texttemplate,withcentered

defaultTimesRomantext,asshowninFigure6.1.This

templateisidenticaltothestandardtext-basedeBayitem

description,exceptthatthetextiscenteredinsteadofbeing

left-aligned.Somepeoplepreferitemlistingstobecenteredon

thepage,whichiswhythisisapopularapproach.



Figure6.1.Centeredtext.



[Viewfullsizeimage]



Now,therearetwowaystocodethistemplate.Thefirstuses

simpleHTMLandthe
tag,likethis:





Thisisthefirstparagraphofthedescription





Thisisthesecondparagraphofthedescription






ThesecondapproachusesCascadingStyleSheet(CSS)rulesto

defineeachparagraphwithcenteredtext,usingthestyle

attributeandthetext-align:leftdeclaration.Here'showthis

codelooks:



Thisisthefirstparagraphofthedescription





Thisisthesecondparagraphofthedescription





Yougetthesameresultswitheitherapproachand,inthis

instance,thesimplicityofplainHTMLmaybepreferabletothe

relativecomplexityofCSS.Butinotherinstances,you'llfind

thatCSSisalittlemoreefficient,andalotmoreaccuratein

howitdefinesvariousattributeswhichiswhyIpresentthis



templatewithbothapproaches.



Caution

Toomuchcenteredtextbecomesdifficulttoread.

Forthatreason,trytoavoidusingtoomanylong

textparagraphswiththisparticulartemplate.



Template6.2.Left-AlignedTextwithBulletedList



Whenyou'resellinganitemwithalonglistofdimensions,

accessories,features,orbenefitsor,inthecaseofmusicCDs,

anextensivetracklistoneneatwaytopresentthistypeof

informationisinabulletedlist.Template6.2,showninFigure

6.2,containssuchalist.



Figure6.2.Left-alignedtextwithabulletedlist.



[Viewfullsizeimage]



IfyourememberyourHTML,youknowthatcreatingabulleted

listisrelativelyeasy,thankstothe

Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Chapter 6. Creating Text-Based HTML Auction Templates

Tải bản đầy đủ ngay(0 tr)

×