Best Answer
margin: 0px auto; to the style attribute of the table.

User Avatar

Wiki User

โˆ™ 2009-10-28 12:40:24
This answer is:
User Avatar
Study guides


28 cards

What is HTML

How do you make homework fun

Why are car not made by order

Why is DNA of cats and dogs more similar than DNA of cats and hamsters

See all cards
1 Review

Add your answer:

Earn +20 pts
Q: How do you center a table in HTML?
Write your answer...
Still have questions?
magnify glass
Related questions

What is td in HTML?

This tag defines a standard cell in an HTML table. It stands for Table Data.

What are different tags of HTML?

<HTML>, </HTML> <HEAD>, </HEAD> <BODY BGCOLOR="GREEN">, </BODY> <CENTER>, </CENTER> <IMG SRC="myimage.jpg"> <H1>, </H1> <HR> <P>......................</P> <BR> <TABLE> <TC>, <TH>, <TD>, <TR> </TABLE> <OL>, <UL> <A HREF="mysite.htm">Click here to go to the second page of this site</A> <FONT> Please also see the related links for more examples of HTML tags.

What attribute of the table tag controls the table alignment?

The attribute the controls the alignment of a table is the "align" attribute. It's possible values are left, right, and center. This attribute sets the alignment of the table in relation to the rest of the document. <table align="center"> .... </table> This attribute was deprecated in the HTML 4.01. That means that you can use it in HTML 4, and expect it to work in the browsers, but there are better ways of achieving your goal. (CSS) If you're using HTML 4.01 Strict as your doctype, then use of align is obsolete (meaning the browsers no longer have to support it and its use is prohibited.) The same goes for XHTML 1.0 Strict, and the current draft of HTML 5. Instead, use CSS margins and floats.

How alignment the header in HTML table?

Alignment can be done by the style tag in html. It could be applied along with the <table> tag.

How do you create and use an HTML table?

HTML tables are created by the <table> command. Inside the table we can use tags like <li>, <ul>,<ol> etc.

How can you insert table caption in header in HTML?

You can insert table caption in header in HTML. You just have to insert that caption in <p> element.

What are the names of tag available in HTML?

There are many different tags and names but here are a few: <html><body><title><marquee><h1><h2><Font face size color><table><center><left><right>

Can you centrally align the heading of the HTML document you created?

When you create an HTML document, you can include a heading on the page. Here is an example of how you can use HTML to center the heading: <center><h1>Page Heading</h1></center>.

What is an advantage of exporting a table to an HTML file?

The advantage of exporting a table in HTML is that you could easily manipulate it. You could also show it in a website.

How do you put background image in table in HTML?

<table background="image name.jpg">

How do you create homepage or web page from event in table format using HTML?

Homepage can be created using HTML or various other languages. <table> can be used to create tabular format in HTML.

What is the functin of the tr in HTML?

The <tr> tag in HTML functions to define a table row. It's part of a <table> tag's body, and is used to contain either table headers <th> or table cells <td>.

People also asked