formatting text on a web pageThis page deals with html tags for formating a webpage with text and will show how to create a headline, how to make paragraphs, how to pick fonts and change their color and sizethe h tagUse the H tag to create a headline, the h tag comes in six flavours (yum yum!)<H1>this is h1</H1><H2>this is h2</H2><H3>this is h3</H3><H4>this is h4</H4><H5>this is h5</H5><H6>this is h6</H6>the following attributes can be added to the H tag align=[ left | center | right | justify ] example <H5 align=left>Hello World</H5> the P tagA very similar tag to the H tag is the P tag which defines a paragraphThe <P></P> tags are also a block level element and share the same attributes as the H tags align=[ left | center | right | justify ] <P align=left>Hello World</P> the font tagProbably the most versatile text formatting tag is theThe font tag not only allows the color and size of text to be selected but also allows specific fonts to be selected an example of the font tag change the color choose from 1 of 7 sizes using specific fontsUnless a font is specified in a html document all of the text contained in it will be rendered in the users default font, this is also true if the specified font is not installed on the users computerThe font tag gives enough flexibility to allow html authors to specify a in the example above the browser will attempt to render text in the georgia font, if the georgia font is not installed the browser will attempt to render text in the times new roman font and if that is unavailable the browser will search for the arial font the following 12 fonts are installed on both pc and mac and are considered as 'safe'
the font tag is an inline element, if the browser encounters the font tag in the middle of a line of text it does not cause a linebreak heres some quick links to some useful tools
monospaced textto create typewriter text (teletype text) use the
preformatted textuse theCredit: POOH by joan stark, visit joan's ascii art website (new window) remember not to make lines of text too long when using the pre tag or users will be forced to scroll sideways pre is a block level element some quick tagsuse theuse the use the use the use the the maximum font size is 7 use the the minimum font size is 1 home html tutorial css tutorial javascript webmaster articles link exchange |
html tutorial make money from your website |