Asim Posted December 14, 2011 Share Posted December 14, 2011 In HTML they have introduced new tags like <article> and <aside> need IDs e.g <article id="one"> Link to comment Share on other sites More sharing options...
ShadowMage Posted December 14, 2011 Share Posted December 14, 2011 They only need an id if you need to access them with JavaScript or if you just want a way to identify them. No elements require an id. Link to comment Share on other sites More sharing options...
Asim Posted December 14, 2011 Author Share Posted December 14, 2011 I tried today using this code: HTML <article></article> then in CSS I had article{} Functions all worked but when I did this: article img { float:left} then nothing work, I think you need the ID if you want to use anything after the article img, or p etc.. Link to comment Share on other sites More sharing options...
Ingolme Posted December 14, 2011 Share Posted December 14, 2011 It probably means that there is no content following the image to float next to. Remember that floated elements only float to the left or right of the content that follows it and not anything before. Also remember that if the image is as wide as the container, no more content fix next to the image and will go below it anyways. An element does not require an ID to do anything. Link to comment Share on other sites More sharing options...
Asim Posted December 14, 2011 Author Share Posted December 14, 2011 It probably means that there is no content following the image to float next to. Remember that floated elements only float to the left or right of the content that follows it and not anything before. Also remember that if the image is as wide as the container, no more content fix next to the image and will go below it anyways. An element does not require an ID to do anything. There was content, there was an unordered list, I also resized the li element so it did not stretch fully but the content still never moved up, but anyway it's solved now thanks! Link to comment Share on other sites More sharing options...
Don E Posted December 14, 2011 Share Posted December 14, 2011 I heard somewhere that some or most HTML 5 tags don't require closing tags anymore? Like the closing tag for image: />If so, isn't HTML5 based of XHTML where closing tags are required? Link to comment Share on other sites More sharing options...
ShadowMage Posted December 14, 2011 Share Posted December 14, 2011 HTML 5 supports both syntaxes. (HTML and XHTML) But no, HTML 5 is not based on XML (which is what XHTML is based on). It is based on SGML, same as HTML 4. Link to comment Share on other sites More sharing options...
Ingolme Posted December 14, 2011 Share Posted December 14, 2011 HTML 4.01 doesn't require closing certain tags, like <link>, <meta> and <img>. You'll get a warning from the validator if you try to close a tag with /> in HTML 4.01 Link to comment Share on other sites More sharing options...
Asim Posted December 17, 2011 Author Share Posted December 17, 2011 I heard somewhere that some or most HTML 5 tags don't require closing tags anymore? Like the closing tag for image: /> If so, isn't HTML5 based of XHTML where closing tags are required? That's what I read in a book however half of the browsers (especially IE) and my developing program Expression Web 4 have got issues with it. We need to wait until HTML 5 has become a full stable release for every singe browser. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.