PDA

View Full Version : HTML Help



Lamz
25-11-2011, 06:09 PM
Hey, two things...

could some1 tell me the html code to center something & also...

could some1 please give me a html code to get my playlist to play automatically like auto start...

please

beth
25-11-2011, 06:22 PM
<center></center> or <p align=center></p> usually work dunno bout the second one!

triston220
25-11-2011, 06:25 PM
To center something, use the style attribute:


<label style="text-align: center"</label>

For audio, use:



<audio controls='controls' autoplay='autoplay'>
<source src='SRC' type="audio/ogg" /> <!-- Extension is .ogg -->
<audio src='SRC' type="audio/mp3" /> <!-- Extension is .mp3 -->
A HTML5 compliant browser is required to listen to this music.
</audio>


The document type (The first piece of markup):


<!doctype html>

Edit: To above: The Center tag is not supported as of HTML5.

hamheyelliot
26-11-2011, 02:04 PM
Take your div, let's say it's <div id="container">code/content</div>

Head to your stylesheet and center it with: #container {margin: 0 auto}

The 0 tells it to leave it alone vertically (remove it if you want all-round centering) and the auto tells the browser to center it horizontally. Let me know if anything is confusing at all!

Want to hide these adverts? Register an account for free!