Jump to content

Question About Html 5 Tags


Asim

Recommended Posts

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

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

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

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...