- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How do we set the alignment according to surrounding elements in HTML?
Use the align attribute to set the alignment. You can try to run the following code to implement align attribute in HTML −
Note − The align attribute deprecated in HTML5. Use CSS instead.
<!DOCTYPE html> <html> <body> <p align="right">A right-aligned paragraph.</p> <p><b>Note:</b> The align attribute is not supported in HTML5. Use CSS instead.</p> </body> </html>
- How to set Text alignment in HTML?
- How to set Heading alignment in HTML?
- How do we set text font in HTML?
- How do we set the type of element in HTML?
- How do we set the text direction for the content in an element in HTML?
- How do we style HTML elements using the division tag <div>?
- How do we style HTML elements using the span tag <span>?
- How do we embed custom data attributes on all HTML elements?
- How do we set what value is the optimal value for the gauge in HTML?
- How do we set an image to be shown while the video is downloading in HTML?
- How do we set the range that is considered to be of low value in HTML?
- How do we set the visible number of lines in a text area in HTML?
- How do we set what media/device the linked document is optimized for in HTML?
- How do we set the Java environment variable in cmd.exe?