Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-15-2012, 07:40 PM   PM User | #1
coro
New to the CF scene

 
Join Date: Oct 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
coro is an unknown quantity at this point
Post Tags in CSS?

Hey everyone

Just joined the forum
It's been a few years since I last did any programming in relation to HTML, CSS and JS. I've looked at a few templates to see how different developers plan and program their sites. My question is why in a CSS document would a developer place this:

Code:
"  article, aside, audio, canvas, command, datalist, details, embed, figcaption, figure, footer, header, hgroup, keygen, meter, nav, output, progress, section, source, video {
	display:block
}
mark, rp, rt, ruby, summary, time {
	display:inline
}"
I've heard that it's tags? But I don't understand it's purpose, sorry for the stupid question. Hope everyone's ok and thanks in advance!
coro is offline   Reply With Quote
Old 10-15-2012, 09:10 PM   PM User | #2
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,530
Thanks: 0
Thanked 503 Times in 494 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
They are proposed HTML 5 tags that not all browsers currently understand. By including those definitions in the CSS it becomes possible to use those tags in the HTML without the page breaking in the browsers that don't understand them.
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/
felgall is offline   Reply With Quote
Old 10-15-2012, 09:12 PM   PM User | #3
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,699
Thanks: 5
Thanked 875 Times in 850 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
CSS has no tags, it has selectors, properties, and values, grouped in rules:
Code:
/* this is a comment and the line below is a CSS rule */
selector {property: value;}
The simplest selectors are element selectors. The selector h1 applies to all <h1> elements in the HTML document:
Code:
h1 {color: red;}
And if multiple element types should get a similar style, CSS selectors can be separated by commas: h1, p {color: red;} applies to all <h1> and <p> elements in the document.

So, in conclusion, what you posted above are all element selectors that apply to their respective HTML counterparts (in this case it’s mostly the new HTML 5 elements), like <article>, <aside>, <audio>, etc.

These quotes, however, are invalid and should not be there. But it might be that you’ve just put them there by accident.
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Reply

Bookmarks

Tags
css, html, tags

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:11 PM.


Advertisement
Log in to turn off these ads.