ronald Posted February 11, 2014 Share Posted February 11, 2014 hi there, i got a prob with finding refence for attributes. perhaps im not looking right, or missing things. i started looking for div attributes, finding on w3s this: - The <div> tag also supports the Global Attributes in HTML. - The <div> tag also supports the Event Attributes in HTML. i also checkt this site: http://www.w3.org/TR/html401/struct/global.html#edef-DIV at 7.5.4 there is it about the div now, i got this: (and it works just fine) <!doctype html> <html> <head> <title>my first website</title> <style type="text/css"> #myfirstdiv {border:2px solid red; width:100px; position:absolute; top:200px; left:100px;} </style> </head> <body> <div id="myfirstdiv">hello there!</div> </body> </html> i figure, this are examples of attributes: top, left, position, border, width (thats what i think at least..) but i dont see those above on the reference links. do i interpret something wrong? regards, R Link to comment Share on other sites More sharing options...
ronald Posted February 11, 2014 Author Share Posted February 11, 2014 ah.....just found my own aswer i gues, its css, not html attributes. pfff, html/css is big, how do i ever find out and get in my head what belongs where, and when can i use what?? Link to comment Share on other sites More sharing options...
davej Posted February 11, 2014 Share Posted February 11, 2014 In general the only thing you want to apply to a div is an id or a class. Link to comment Share on other sites More sharing options...
thescientist Posted February 14, 2014 Share Posted February 14, 2014 and attributes Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now