Skip to main content

Posts

Showing posts with the label letter spacing

Three formats of calling css

Call using tag: We can call a css using the tag like below. td { padding: 5px; text-align: left; background-color: #F2F2F2; } Here all the attribute with td tag will be formatted with this css. Call using id: We can call a css using the id like below and the css will be applied to the particular attribute with this particular id. #p1 { background-color: #00FF00; padding: 2px; } Here all the attribute with td id 'p1' will be formatted with this css and while using id we should call id starting with a hash (#). And in html file <div> This call calls using id </div> Call using class: We can call a css using the attribute 'class' like below and the css will be applied to the particular attribute with this particular class attribute. .p1 { background-color: #00FF00; padding: 2px; } Here all the attribute with td id 'p1' will be formatted with this css and while using id we should ...

CSS - Borders

The border properties allow you to specify how the border of the box representing an element should look. There are three properties of a border you can change The border-color Specifies the color of a border. The border-style Specifies whether a border should be solid, dashed line, double line, or one of the other possible values. The border-width Specifies the width of a border. Now we will see how to use these properties with examples. The border-color Property: The border-color property allows you to change the color of the border surrounding an element. You can individually change the color of the bottom, left, top and right sides of an element's border using the properties: border-bottom-color changes the color of bottom border. border-top-color changes the color of top border. border-left-color changes the color of left border. border-right-color changes the color of right border. The border-style Property: The border-style property allows...

Centering Text with CSS

Centering text and other elements can easily be done with the CSS text-align property. Applying this to an internal or external stylesheet: p {text-align: center;} or this to inline styling: This is centered text

Html Interview Questions

Which browsers support HTML 5? Almost all browsers i.e. Safari, Chrome, Firefox, Opera, Internet Explorer support HTML 5. What is SVG? SVG stands for scalable vector graphics. It’s a text based graphic language which draws images using text, lines, dots etc. This makes it lightweight and renders faster. What is canvas in HTML 5? Canvas is an HTML area on which you can draw graphics. What are the restrictions of Web Worker thread? Web worker threads cannot modify HTML elements, global variables and some window properties like Window.Location. You are free to use javascript data types, XMLHttpRequest calls etc. How to terminate a web worker? w.terminate();

Formatting and Styling Text in CSS

Text indention [text-indent] The property text-indent allows you to add an elegant touch to text paragraphs by applying an indent to the first line of the paragraph. p { text-indent: 10px; } Text alignment [text-align] The CSS property text-align corresponds to the attribute align used in old versions of HTML. Text can either be aligned to the left, to the right or centred. In addition to this, the value justify will stretch each line so that both the right and left margins are straight. p { text-align: left; } h1{ text-align: right; } h2{ text-align: center; } b { text-align: justify; } Text decoration [text-decoration] The property text-decoration makes it is possible to add different "decorations" or "effects" to text. Some properties are underline, overline, line-through. h1 { text-decoration: underline; } h2 { text-decoration: overline; } h3 { text-decoration: l...

Special Effects in HTML - Marquee

If you want your text to move with in the screen, use the tag   <marquee> .  The text in between the tags will move horizontally. <marquee bgcolor=pink> will give background color to marquee texts.   <marquee bgcolor=orange width=100 height=20> will set height and width for marquee text. <marquee bgcolor="orange" direction="right" height="20" width="100"> will set   direction to marquee text. <html> <body> This is a scrolling text This is a scrolling text with background color This is a scrolling text This is a scrolling text This is a scrolling text </body> </html> Copy and download the code and try your self.

Using Html Styles And Colors

Using html Styles and Colors : This post will help you to understand the use of div element and using styles and color elements perfectly. Copy the code and try... <html> <body> HTML STYLES AND COLORS Text with space Spannable Text </body> </html>