Sunday, April 19, 2015

7 Basic Steps in Creating Webpage


  1. Create a mock-up 
  2. Plot the content
  3. Markup the content with HTML tags
  4. Layout the CSS for desktop
  5. Extend the markup
  6. Extend the CSS with @media query
  7. Learn from your mistakes
There are thing you want to do methodologically. And creating a web page is one of them.

Create a Mock-up

This is were you get creative. No codes needed here. Just good old fashion pen and paper. An A4 sized paper would suffice. Just put in the paper what you imagine.

Plot Your Content

Just think about what you are going to tell your audience, viewers or visitors. Just like how you would right a letter, journal, report or just about anything. Don't think about it like a webpage. We'll get to the codes later. This is all text and pics(whenever needed)

Content is King

You probably heard or read about this and there's a reason why it's popular. That's because content is literally the king. Content is what make visitors come to you. Content is the reason why you have traffic. In short: it's necessary. So, make sure you got that down first. Dont' move on to the next without finishing your content first.

Markup the Content with HTML Tags

You would have a title, headers, sub-headers, paragraphs, images, forms, etc. But don't use CSS. Not yet, at least. Why? It has to start from the root, which is the content. HTML can stand on it's own, CSS cannot. So, you want an HTML that you can read without any design. It should be straight up, plain and simple. 

Don't Use a Tag if You Don't Need a Tag

Use only what you need. Because not only does it add to how much the page would consume, it's also dirty. Steve Jobs talked about a thing he learned from his father. “He loved doing things right. He even cared about the look of the parts you couldn't see.” If you're a front end web developer then I suggest to clean up your codes. Again, if you're not done with the base tags, don't proceed.

Layout the CSS for Desktop

This is where your design would come to life and take its initial shape. Basic elements like fonts, alignment, color and sizes are tackled here. If you encounter a bug and you need to add more tags on your HTML, skip it. Note down all possible bugs and complete your CSS. Those bugs will be dealt with in the next step.

Extend the Markup

Some designs would require hacking. If a straight up CSS can't do it and we need a little tweaking, then we need to add more tags and declarations This means looking for a way to make things work and to realize your design.

<div><span>

These are you friendly neighborhood tags. These are the team that you call for back-up. Utilize them carefully and proceed with caution. You will find out more of these as you progress.

Extend the CSS with @media query

So you have finished your page. Now you check it with other devices such as ipads, ipods, android phones or tablets.use @media on your CSS and viewport meta tag on your HTML. Refine the design until you see the desired result.

Learn From Your Mistakes

When you finish, you will have things that you wish you did and probably try again. This could probably by on the design. Say, the button should be a little narrow of the headline should have a different background color. But you have to stop yourself. Learn from that mistake and prepare for the next project. You will not finish if you keep repeating the cycle. Stick to the design and finish it. Don't do the same mistake on the next project.

Saturday, April 11, 2015

Viewport

Responsive design website? Mobile browsing? You need to know this...

<meta name="viewport" content="width=500, initial-scale=1">

Always put this inside your <head>. I haven't figured the details yet. But i know it works.

Friday, April 10, 2015

Center this, center that

To center:

if...
<div class=section>
<p>This paragraph…</p>
</div>
then...
.section {
text-align: center; /*to center horizontally*/
position: relative     /* to declare the div as container for the any positioned element within */
}
.container p{
   position: absolute; /*to make the element position absolute*/
   top: 50%;     /*to center vertically*/
   transform: translate(0, -50%) /*to move the element up by half*/
}

or

.center {
    margin-left: auto;
    margin-right: auto;
    width: 70%;
    background-color: #666;

Monday, April 6, 2015

Web Safe Fonts


In html, FONT is of the essence. Top issue that you'll encounter is the availability of the font you want on your viewer's computer. Since OS have pre-installed fonts, those should be on the top of your choices. Here's what your list should have.
  1. Arial
  2. Times
  3. Verdana
  4. Helvetica
  5. Georgia
  6. Trebuchet
  7. Courier

Thursday, August 28, 2014

SVG: Scalable Vector Graphics

Was messing up with a logo of my own. And I was able to come up with this:
Then I figured, there's SVG. And so I learned, and came up with this:

<svg width="150" height="150" >
<rect
x="0"
y="0"
width="150"
height="150"
style="fill:white;stroke:black;stroke-width:20;opacity:1"
/>
<rect
x="25"
y="25"
width="100"
height="10"
style="fill:white;stroke:black;stroke-width:20;opacity:1"
/>
<rect
x="70"
y="55"
width="10"
height="70"
style="fill:white;stroke:black;stroke-width:20;opacity:1"
/>
</svg>

Scalable Vector Graphics are fascinating!

Happy coding!

Tuesday, July 8, 2014

finding @media

i don't learn the usual way. i reverse engineer. first time i learned html 10 years ago was by doing view source - and i still do. it was both fun and productive for me. and so i did.

but it took me a while before i found what i was trying to look for (and i don't even know what i was looking for, trouble with reverse *engineering).

*now, i'm reminded of the movie: paycheck with ben affleck. it was about reverse engineering. it was a good one. you should watch it

going back...

i was looking for:

  1. a website with rwd(responsive web design)
  2. clean readable codes(codes that uses line breaks)
  3. line that would make me think(this is the "i dont know what i was looking for" part)
and i found: 
  1. foodsense.is
  2. its clean css code
  3. and that line that made me think: line 1185
@media only screen and (min-width: 768px) and (max-width: 991px) {
so, i searched high and low... and found:
That’s a media query. It prevents the CSS inside it from being run unless the browser passes the tests it contains. - Paul D. Waite on stackoverflow.com
here's a recommended reading to understand @media better, courtesy of w3.org

let me leave you at that and i'll go study some more..

looking back

a flash back: 2006 is when i started my own web design firm and had several clients: until i joined the workforce and submitted myself to the norm which is to have a 9 to 5 job. reason? who cares. i just want back.

that time i ended as an advocate of standardization to eliminate the use of <table>. and to my surprise, what i have been fighting for endured and won without me. lols

what made me want back?

"responsive web design - is a web design approach aimed at crafting sites to provide an optimal viewing experience—easy reading and navigation with a minimum of resizing, panning, and scrolling—across a wide range of devices (from mobile phones to desktop computer monitors)." from wikipedia

so, if you want to follow me in my journey to html, css and java coding, sit back, relax and enjoy the read.

moving forward.

all roads lead to this article of ethan marcotte published last may 25, 2010, entitled: responsive web design.

let me brush up on my codes, write down some notes and play around with my fave tool: notepad++