Skip to main content

common html element

<head> this tag will list down all metadata of the html doc. Popular metadata include <link> , <title> and <meta>

<h1> to <h6> from big heading to subheading , this represents the titles of the HTML document
Note: do not use <h1> tag to make text bigger, use CSS.

<p> the text paragraph of the HTML doc. block element

<div> and <span> these are for styling the html element, div is block , span is inline

<a> anchor tag, provide a link to another page.  inline element.
<a href="http://www.google.com"> Google </a>

<strong> and <b> , both will make text bold , but <strong> means that text is more important.
both are inline element

<em> and <i>   , <em> is emphasize the text , <i> to speak in alternative tone.
both are inline element

<nav> is for navigation links , for semantic purpose.

<small> to represents fineprint, side comment.


<header> <section> <aside> <footer> <article> All these provide semantic meaning to html.
Introduced only in HTML 5. No styles are implied.


Comments

Popular posts from this blog

Problem Solving - Refactored

I am going to outline how I approach problem solving. The relative importance and the amount of effort/time required for each is stated as a percentage beside each topic. I borrowed some idea from George Polya's How to Solve It Thoroughly Understand the Problem (30%) When encountering hard problem , you need to deeply understand the problem at hand. Take a paper and list down all known facts and data and what the question is trying to find. Sketch out the problem if applicable. Visualize the problem in your head. A lot of times, we only have to understand the problem well, then the solution will obvious. Have a Plan (20%) You need to have an outline of how you are going to tackle the problem. You need to have a logical pathway that will ultimate produce outcome (nothing to do with coding syntax yet). Without a plan, you are just randomly poking around and got lucky. No hard problem ever gets solved without a plan. Plan using pseudo-code, pen & paper or flowchart. Use wh...

Static vs Relative vs Absolute vs Fixed

Static: the default position. Everything starts from top to bottom nicely according the document flow. Relative: still within normal flow of document. But accept offset position, relative to its original document flow position Absolute: out of normal flow. It doesn't interact with elements around it anymore. The reference point will be parent element that has relative positioning, if not, reference body element. Accepts offset position Fixed: out of normal flow. The element sticks to a corner of the page even if user scrolls. Reference the windows view.

Scan

"hello world this is me !".scan(/\b[\w']+\b/) { |word| puts word } The above code will scan for a pattern of 1. word boundary 2. 1 or more word character plus ' 3. another word boundary Then it will output the word scanned. @phrase . downcase . scan ( /\w+'?\w+|\w+/ ) The above code will scan for a pattern of 1. one or more word character plus an ' (apostrophe) 2. the ? means the pattern to the left is one or none. In this case, whether ' is one or none. 3. follow by another word character of 1or more. 4. If the previous pattern didn't match , then use the second pattern. Which is 1 or more word character Word character is letters, numbers and underscore phrase . downcase . scan ( /[a-z]+'?[a-z]+|\d+/ ) The above code will scan for a pattern of 1. 1 or more any letters 2. 1 or none ' 3. follow by 1 or more any letters 4. If the previous pattern didn't match. 5. Then any length of digits.