html code examples

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

html code examples

will
My html is very rusty.

I can read it, but I can't write it, especially if it's writing from scratch.

Instead of learning html/CSS, I hope that I can just get sample html code that I can tweak.

I ask this also because with html/css, there is a hundred different ways to achieve the same result, and I just don't know which way is the best. So, I would pretty much randomly pick up a way, and that way may well be the worst possible way.

With a sample code, you can put me on track to having the simplest code.

- a single span of text

             text

This may look trivial, but what's best way to specify a block of text? font family, size, weight, padding, alignment etc.

- a single span of image

             image

Again, what's the best way to specify alignment and padding etc.

- two columns of text

          text        text

- two columns of image and text

         image      text

- two columns of images

         image      image

- text floating on image

          text
             image    

   http://fschmidt.luanhost.com/will.html
Reply | Threaded
Open this post in threaded view
|

Re: html code examples

fschmidt
Administrator
Recipes are not the right way to code.  Even if you don't read this book, you should have it as a reference:

https://www.amazon.com/Cascading-Style-Sheets-Designing-Web/dp/0321193121/

As a general rule, don't use any technology developed by modern culture after 2005.  By then modern culture had become completely depraved and everything it produced is crap.  This includes new HTML tags and CSS.

I will give very broad suggestions here.  Then you try and then we can discuss what you did on Skype.  That way I can convey understanding, not just recipes.

For blocks use "div" or "p".  For columns use tables.  Modern (depraved) programmers hate tables.  This is because tables are very good and simple and flexible.  For specifying font family, size, weight, padding, alignment, etc. use a "style" block in the head.
Reply | Threaded
Open this post in threaded view
|

Re: html code examples

will
I did read that book.

But there are so many things in that, it's hard to get any "understanding", it's a reference book.

fschmidt wrote
For blocks use "div" or "p".  For columns use tables.  Modern (depraved) programmers hate tables.  This is because tables are very good and simple and flexible.  For specifying font family, size, weight, padding, alignment, etc. use a "style" block in the head.
This is a very useful guideline.

Nobody ever talked html like this.

It's always details, and a 100 days to do the same thing.

I always liked Tables.

But without you telling me this, I'd probably find some mod way of doing it and waste a lot of time learning and maintaining that.

I'll ping you tomorrow morning to get some real understanding of this!