Frames and Text Formatting Tag of HTML

Frames of HTML

Html frames are useful at dividing the web pages or the web browser into multiple sections, they are separates section then loaded differently.

A-frame displays contents independent of it container. Multiple frame form a collections and is known as a framesets. The arrangements can be considered similar to the orientations of rows and columns in a tables. The frame tags have been deprecated in HTML5.

Each frames have a frame tags to indicate. The horizontal frames are defined by the row attributes of the frame tags, and the vertical attributes are defined by the column attributes of the frame tags in the HTML documents. The same window in one frames might display a static banners, a second navigations menu, etc.

Syntax of Frames

In HTML, there are no end tags for the frame tags. When we uses frame in a webpages, we use frameset tags instead of a body tags. Using frameset tag are how we instructs the webpages to divide it into frame The frame tags define which HTML documents should open as frames.

The attributes cols takes the value in pixel and they helps at specifying the number and size of column in a framesets.

  <cols =”10%,80%,10%”>

Similarly, as we can saw above the attributes rows take the values in pixel and they helps at specifying the numbers and size of row in a framesets.

    <rows =”10%,80%,10%>

However, its should be duly noted that the frame tags have deprecated in HTML5 and its no longer used.

Different Type of Frames in HTML

One’s of the use of frames have always been to load navigation bar in one frame and then loaded main page into a separate frames. A-frame tags define one single windows frame within a framesettag.

frame have browsers support in Chromes, Internet Explorer, Mozilla’s, Safari and Opera Mini , etc.

The differents and some commonly used attribute in the frames is attribute such as borders, scrolling, src, name, etc.

Types of Frame Tag

The <frameset> Tag Attribute

There is five importants attribute of the framesettag and we discuss its here :

1. Col:The verticals frame is given by the col attributes. The widths, however, can be specify in 4 way:

  • Pixels: absolutes value can be mentioned in pixel. If we have to creates three vertical frame, we can gives the value: cols=”100,50,100”.
  • Percentage: The percentages of the browser windows can be mentioned. If we have to creates three vertical frame, we can gives the values: cols=”40%,20%,40%”

We can also be makes uses of the wildcards here (*) and lets the wildcard takes the remaining of the windows which remains un-mentioned.

cols=”30%,*,30%”

Output-

2. Rows: The horizontal frame is given by the row attributes. Its specifies the row in a frameset tag. If we have to create the three horizontals frames we use:

Eg: Rows=”10%,80%,10%’.

We can also be sets the height of each rows as we had done in the cases of columns previously.

 Output: 

3. Border: Its specifies the width of borders of each frame in pixels.

Eg: border=”4”. If border=”0”, means there is no border.

4. Frameborder:If a three-dimensionals borders needs to be displayed between frames then we uses this attribute. The values which the attributes takes are either 1 or 0 ( Yes or No).

Eg: frameborder=”0″ means no border.

5. Framespacing: This attributes specifies the amounts of space between frame in a framesets. Any integer values can be given here for this attributes.

The <frame> Tag Attribute

There is 8 attributes that can be listed here in this sections.

  1. src:We will be provides the files name to this attributes that its supposed to be loaded into the frames. The values of this attributes can be any URL.

    Eg: src= www.facebook.com .
  • name:This attributes provide a name to the frames. Its define which frames a documents should be loaded into. If you have multiples link in one frame which load into another frames then we make uses of this attributes. Then the second frames need a name to identify itself as the targets of the links.

    Eg: name=”abc.htm”
  • frameborder:This attributes is specified to shows if the border is to be shown or not. The values take up are 1 or 0 (Yes or No).
  • marginwidth: The attributes are helpfully at specifying the width of the space between the lefts and rights of the frames borders and also the contents of the frames. The values are given in pixel.

    Eg: marginwidth=”10″.
  • marginheight:The attributes are helpfuls at specifying the height of the spaces between the tops and the bottoms of the frame borders and also the content of the frames. The values are given in pixels.

    Eg: marginheight=”10″.
  • noresize:These are attributes basically prevent the user from making any change to the already presents frame. In the absence of this attributes, any frame can be to resized.

    Eg: noresize=”noresize” .
  • scrolling:This attributes are takes control of the appearance of the scrollbar which is presents on the frames. The values either a ‘yes’, ‘no’, or ‘auto’.

    Eg: scrolling=”no” mean it should not have scroll bars.
  • longdesc: This attributes let you provides a link to another pages containing a long description of the contents of the frames.

    Eg: longdesc=”framedesc.html” .

Text Formatting Tag of HTML

Introduction to HTML Text Formatting Tags

Formatting a text are an important parts of modern internet web page, even when we was limited to having text-based web browser, text formatting such as sizes, orientations, etc. was available. With moderns HTML revision, there is a ton of HTML Tag that can be to use to make the text appearances to your liking.

Formatting Text with HTML tags

Below we will be discuss some important HTML tag that is used to format texts:

  1. Formatting Texts as bold in an HTML
  2. Highlighting Text with HTML Code
  3. Setting Text as Italic in HTML5
  4. Underlining Text in HTML
  5. Text with a strikethrough
  6. Writing in Monospace font in HTML
  7. Subscripted Text in HTML

Example

      <!DOCTYPE>

      <html>

      <body>

      <p> <b>Here is some text in bold. </b></p>

      </body>

      </html>

Output : 

The strong tags, on the other hands, are considered as a logical tags and its uses to informs the browsers that the texts in the tags as some logical importance.

Example

      <!DOCTYPE>

      <html>

      <body>

      <p> <strong>This is an important content

      formatted using the strong tag </strong>,

      and this is just

      normally formatted text</p>

      </body>

      </html>

Output: 

  1. Highlighting Text with HTML Code

In situation where you wants to highlight some texts with a highlighter effects, the tags mark can be uses, with default CSS, the tags make the background of texts as yellow helping you grabs the attentions of a visitor on that texts easily.

Example

      <!DOCTYPE>

      <html>

      <body>

      <h3> This text uses <mark> Mark</mark>

       tag to highlight text on the page </h3>

      </body>

      </html>

Output : 

  • Setting Text as Italic in HTML5

Just as setting texts as Bold, you can uses i tags and em tags to sets text as italic on HTML5.

Using i let the browsers know that it have semantic importance.

Example

      <!DOCTYPE>

      <html>

      <body>

      <p> <i> This is the first para in italic text.

       </i></p>

      <p> <em> This content is made italics with the

      em tag</em>, This is normal text </p>

      </body>

      </html>

Output :

  • Underlining Text in HTML

The HTML tags u can be uses to add an underline in the texts. Be carefull not to use underlining with blue texts as its may confuse visitor that the texts are link.

Example

      <!DOCTYPE>

      <html>

      <body>

      <p> <u> This is Text with underline

      tag. </u> </p>

      </body>

      </html>

Output : 

  • Text with a strikethrough

In case where you need to draws a horizontal lines through the texts, tags strike can be uses. The line drowns are thin so the text its crossing can still be read easily.

Example

      <!DOCTYPE>

      <html>

      <body>

      <p> <strike> Here is a sentence with

      strike through text </strike>. </p>

      </body>

      </html>

Output :

  • Writing in Monospace font in HTML

Using Monospaces can be useful in situation where you wants to quote somethings, or you wants to display some codes in the browsers. The Monospaces code, as the name suggest, make the width of every characters same. To gets it on a browsers, we have to uses tt tags.

Example

      <!DOCTYPE>lt;html>

      <body>

      <p> This is normal text. <tt>This

       is some sample text in monospace

      fonts, neat. </tt> </p>

      </body>

      </html>

Output : 

  • Subscripted Text in HTML

In maths and chemistry, using subscripts are an absolute requirements in many occasion. In general writings too, you may come across situation where a subscripts texts are suitable to uses. In HTML’s, any texts under the sub tags will works as a subscripts in the browsers.

Example

      <!DOCTYPE>

      <html>

      <body>

      <p> This is normal text <sub>Notice

      something different with this text? </sub> </p>

      </body>

      </html>

Output : 

Leave a Reply

Your email address will not be published. Required fields are marked *