Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSS image float 2

Status
Not open for further replies.

Cullen411

Programmer
Aug 17, 2005
89
GB
Is there a better way to have the site image top left and then a banner image right. This is what I've come up with

<div>
<img src="images/image1.gif" width="100" height="100" alt="image 1" style="float:left;" />
<img src="images/image2.gif" width="468" height="160" alt="image 2" style="float:right;" />
</div>
 
Phew - I got there in the end, many thanks for staying with me.

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
1DMF said:
oh I see, so some tags should be in a specific order, like lets say the HTML tag then the HEAD tag etc
That would actually more relate to well-formedness of the document. Which is also a necessity with XHTML. The point of semantics is to use elements for what they are there for. Since HTML is through CSS fully customizable, you could use generic elements like <div> and <span> (or even just one of those) to create an entire page. That page would be syntactically correct and could be well-formed, but it would be semantically incorrect. Because semantically, lists should be done with lists (<ul>, <ol>), text in paragraphs (<p>), titles in headings (<h1> - <h6>), form labels in labels (<label>) and so forth.

Since most of us experience the page visually, you don't need to know these semantics, because you see the result -- you see what is in the list, you see what the titles and heading are and what the regular text is. Now picture someone reading a book or an article to you. They might need to tell you stuff like "now this is a list of possiblities" or "this is the sub-heading" or things like that. In that case it is good to know what is what to better understand the text. That is the point of semantically correct markup.
 
so if you create a list not using <UL><OL><LI> , that is not symanticaly correct, because there are tags in HTML to do this and you are not using them.

Man this gets well confusing.

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
Vragabond -

Thanks for the most succinct explanation of "syntactical", "well-formed", and "semantic" I have seen. I innately knew all this, but had always struggled to put it into words when someone asked.

Good job!

Mike Krausnick
Dublin, California
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top