0% found this document useful (0 votes)
27 views1 page

HTML and CSS Basics Explained

HTML is not case sensitive but XHTML is. HTML tags don't need to be closed properly but XHTML tags do. CSS can be applied directly using the style attribute, through an embedded <style> tag, or externally via a <link> tag. Selectors are used to target specific elements or tags to style. The <div> tag is a block level element and <clear> is used to start a new line when clearing floats.

Uploaded by

puppyraj
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views1 page

HTML and CSS Basics Explained

HTML is not case sensitive but XHTML is. HTML tags don't need to be closed properly but XHTML tags do. CSS can be applied directly using the style attribute, through an embedded <style> tag, or externally via a <link> tag. Selectors are used to target specific elements or tags to style. The <div> tag is a block level element and <clear> is used to start a new line when clearing floats.

Uploaded by

puppyraj
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

HTML Basics

HTML is not worry about structure of tags. Even tag is properly closed or not it shows the output. But in XHTML the tags should be closed properly. HTML is not case sensitive. But Xhtml is case sensitive. It bothers about the tags case. So in xhtml all tags and attributes must be in lower case. All attributes must be within double quote. The syntax or format for give attribute is name=value. CSS can be applying in three ways. direct method (i.e., style=color:red; text-align:center) Embed method(<style type=text/css>tag{ name=value} </style>) External method(<link href=[Link] rel=stylesheet type=txt/css />)

* tag at beginning of style sheet can be used to reset the default value as we want. Especially it is used to reset default margin padding value to zero. Position tag is used to position the elements in absolute position. The tag may be position:absolute; top=n px left= n px;

Selector: Selector is nothing but other than select the element/tag you wish to apply styles. We can select elements by: *=Universal selector Type Select = individual tag , = select multiple tags Class selector= create a class, a set of styles. A class name is preceding with .. Div tag is a block level element. clear tag is used to prevent from previous float attribute and begin from a new row.

You might also like