Home Random Page


CATEGORIES:

BiologyChemistryConstructionCultureEcologyEconomyElectronicsFinanceGeographyHistoryInformaticsLawMathematicsMechanicsMedicineOtherPedagogyPhilosophyPhysicsPolicyPsychologySociologySportTourism






Physical and logical text formatting.

The structure of the web-document

 

A web document constructed using HTML has a basic and essential structure. The page always begins with the start tag of the html element and always terminates with the end tag of the html element as follows:
Ex:
<html>...web page...</html>
The html element basically tells your computer that this is an HTML document. All other element tags are 'nested' within the start and end htmltags. The web page is then further subdivided into two main sections which are the 'head' and the 'body'.
The head section begins with the <head> start tag and terminates with the</head> end tag. Immediately following this comes the <body> start tag and just before the html end tag comes the </body> end tag.
There is only one set of <html>...</html> tags, one set of<head>...</head> tags and one set of <body>...</body> tags. This basic HTML web page structure can be illustrated by the following example:

example:
<html><head></head><body></body></html>
The head section or document head has little content and mostly contains HTML coded instructions on how to title, categorize and 'run' the web page. The body section or document body on the other hand contains almost all of the content that you will put on your web page and this content —usually text but can also be pictures and sounds— is formatted using more HTML code. All text that you place outside of any angle brackets will become 'visible text' and will be displayed by your web browser on your web page. By placing that text in between the start and end tags of certain HTML elements, you can instruct a web browser where and how to display that text.

 

Headings, paragraphs, and their attributes. line break

The elements h1, h2, h3, h4, h5 and h6 is used to make headings (h stands for "heading"), where h1 is the first level and normally the largest text, h2 is the second level and normally slightly smaller text, and h6 is the sixth and last in the hierarchy of headings and normally the smallest text.

The Paragraph Tag

The <p> tag and its' closing </p> tag places the enclosed content on a new line and adds a little space above and below it.

HTML Paragraph’s Attributes

HTML paragraph element attributes include:

align- (Depreciated) The align attribute is used to set the alignment of the paragraph with respect to the page size. Values are LEFT, RIGHT, and CENTER. Example: <p align="center">

class - The class attribute is used in conjunction with style sheets to associate an element with a class. The class attribute can set a class for specific element types or it can be independent of element types and work for all elements. The class attribute will provide the settings for specific style formatting.

ID - The ID attribute is used to apply style settings to specific individual HTML elements.



style - The style attribute is used to apply style settings for the specific element the style attribute is included with. An example is" <p style="font: 16pt courier"> - This sets the style or color of the text. This statement starts a paragraph with color, green: <p style="color: green">. The STYLE attribute is common to most HTML elements.

title - Used to give specific elements a title which may appear as a tooltip in some browsers when the mouse is held at or near the element.The Line Break Tag

The <br /> tag forces a line break after it and is the first tag we have come across that has no content and is self closing.

 

Physical and logical text formatting.

Among the tags that affect to the font style, tags divide into physical and logical formatting.In most cases, the use of similar meaning tags of physical and logical formatting leads to the same effect. The difference between them is that the physical formatting tags clearly indicate what properties of the font should change (for example, to make fat), while the logical formatting tags indicate what kind of this text (for example, important).Here is an example: you think that important text should be a red,but not bold. When using logical formatting tags and the browser which supports it, you may configure the display of the text that formatted logically. Text that formatted physically, will always be displayed as the author want and planned it. Of course, if you want that the bold text, use a physical formatting. Otherwise it is recommended to use the logical formatting tags.

The action of tag Physical formatting Logical formatting
bold text <B> <STRONG>
italic <I> <EM>
monospaced font <TT> <CODE> (to highlight the program code, program texts, etc. Usually allocated by fixed-width font)
strikethrough text <S> <DEL> (currently recognized only by Microsoft Internet Explorer browser)

Other logical formatting tags:

<DFN>- Is used to describe the definitions;

<CITE>- Serves to highlight the citation;

<INS>- Marks the text as an insert;

<KBD>- Is used for inputting from the keyboard

<SAMP>- Used to mark the results provided by the program, to select multiple characters monospaced font:;

<VAR>- Used for symbolic variables;

<ABBR>- Is used for abbreviations (CIS, the CPSU, WWW);

<ACRONYM>- Used to cutting (p, Eng.) With the attribute TITLE;

<Q>- cited text in quotes.

 

Lists

Web browsers will show three different types of lists: ordered, unordered and definition lists.

HTML Unordered Lists :An unordered list starts with the <ul> tag. Each list item starts with the <li> tag. The list items are marked with bullets (typically small black circles).

<ul>
<li>Coffee</li>
<li>Milk</li>
</ul>

How the HTML code above looks in a browser:

  • Coffee
  • Milk

HTML Ordered Lists: An ordered list starts with the <ol> tag. Each list item starts with the <li> tag. The list items are marked with numbers.

<ol>
<li>Coffee</li>
<li>Milk</li>
</ol>

How the HTML code above looks in a browser:

1. Coffee

2. Milk

2.

HTML Definition Lists: A definition list is a list of items, with a description of each item. The <dl> tag defines a definition list. The <dl> tag is used in conjunction with <dt> (defines the item in the list) and <dd> (describes the item in the list):

<dl>
<dt>Coffee</dt>
<dd>- black hot drink</dd>
<dt>Milk</dt>
<dd>- white cold drink</dd>
</dl>

How the HTML code above looks in a browser:

Coffee

- black hot drink

Milk

- white cold drink

 

 


Date: 2016-01-03; view: 1046


<== previous page | next page ==>
Level B1 Sales Jobs | URL. Links and their attributes
doclecture.net - lectures - 2014-2024 year. Copyright infringement or personal data (0.006 sec.)