HTML Online Tutorial Contents

Following are the posts for HTML online Tutorial. To learn everything about HTML, just read these posts: HTML Online Tutorial HTML TAGS (2) HTML BASICS (3) HTML ELEMENTS (4) HTML ATTRIBUTES (5) More »

XHTML

XHTML stands for Extensible Hypertext Markup Language. It is also known as XML (Extensible Markup Language). It is a markup language. In XHTML, there are no predefined tags. The user defines the More »

HTML SUMMARY

In this tutorial, you learned: HTML Introduction HTML Tags HTML Basics HTML Elements HTML Attributes HTML Paragraphs HTML Headings HTML Formats HTML Image HTML Links HTML Lists HTML Frames HTML Table After More »

HTML TABLES (13)

HTML Tables are used to arrange data in web pages. HTML allows the use of tables by <table>…</table> tags. Each row in HTML table is recognized by <tr>…</tr> tag. In each row More »

HTML FRAMES (12.2)

Nested frames example: For the following example to work, there are two other simple HTML files : “HMTL11e1 frame a.html” and “HMTL11e1 frame b.html”. your browser will divide your screeub half. The More »

 

Tag Archives: css syntax

Understand the CSS Syntax or Lexical Structure

Understand the CSS Syntax or Lexical Structure:

The lexical structure of CSS is the set of rules that explains how to write code or program in that language. This is also known as CSS syntax. You can use CSS to associate various rules to the elements which will appear on your website. These rules are responsible for the content of those elements which should be rendered. The CSS rule is basically composed of two parts:

Selector: It shows those element or elements on which declaration is applied. If this applies to more than one element then you can use coma to separate the list of elements. Or you can say that it is the name of HTML tag or element to be defined by user.

Declaration: By using declaration you can set how the elements should be styled which are mentioned in the selector.

Example:

td {width:25px;}

Here td is a selector and 25px is Declaration. The declaration has two parts which are usually separated by colon:

  1. Property
  2. Value

Selector {Property: Value}

Property:

It is the property of the selected elements which you want to declare. It is usually the attribute of the HTML tag.

Value:

It is the value of the property of the HTML element or tag.

Example:

H1 {color: maroon}

In the above example, “Title” is the HTML element name, “Color” is the attribute to be changed and “maroon” is the value of the attribute.

It is possible to modify one or two tags at the same time e.g.

H1, H2 {color: yellow}

In the above example, you can change the color of any headings of size H1 and H2 to yellow.

H1,H3 { color: green; font-family: Comic Sans M}

In this example, you can change more than one property for more than one elements. In the above example, the color and font of both H1 and H3 heading will be changed to green and Comic Sans M respectively.

It is also possible to modify one or two attributes of the same tag at the same time e.g.

H1 {color: maroon; font-family: Comic Sans M}

The way in which element or elements can carry the attributes and how the attributes control the property of the element is similar to HTML or XHTML.

To get a mobile app for your business visit www.codescamp.com

Book a free consultation today!