In case I will use any of the new HTML5 Tags like:

<article> or <section> ...

with a doctype of

<!DOCTYPE html>

1.) Can I directly assign a style to this element like:

<article style="margin:100px;"> ?


The W3C link does not explain this really well for HTML5 very dummy friendly.

2.) In case this is allowed, what is a browser expected to render, if the browser does not support the tag (=does not support html5) . Will it render it as div (and apply the CSS) or will the tag be completly omitted and therefore also the applied CSS formatting is lost?

Thanks very much! Jens

1 Answer 1


Yes, you can assign a style to this element (but it's best to use external CSS instead of inline styles).

Now if the browser doesn't support the tag it'll render by default with 'display:inline', or even doesn't render, we don't know for sure what'll happen.

To make sure you can use all the HTML5 tags you may use JavaScript. Here's a link to a Google Code Project called HTML5Shim that assure you can use HTML5 in all browsers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.