Skip to main content

Posts

Showing posts with the label css float

CSS BASICS : CLASS 109 part IV

Hi there, welcome back. This is the final part of class 109. In the previous tutorial we discussed the display property of html elements. In this tutorial we shall discuss the float property. Float is used to place an element on the left or right side of its container, allowing text and inline elements to wrap around it. ( referenced from 1 ) To understand this better, lets write some code. Create a new html file using your text editor and name it 'floating.html'. Write the following code in it, then save and view it in a browser. <!DOCTYPE html> <html> <head>     <title></title>     <link rel="stylesheet" type="text/css" href="floating.css"> </head> <body>     <h1>this is a heading</h1>     <p id="p1">this is paragraph 1</p>     <p id="p2">this is another paragraph, called paragraph 2</p>     </body>...