Like this?
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node[above right] at (0,1) {7};
\node[above left] at (2,1) {6};
\node[above right] at (2,1) {5};
\node[above left] at (5,1) {3};
\node[above right] at (5,1) {2};
\node[above left] at (8,1) {0};
\draw (0,0) rectangle (2,1);
\draw (2,0) rectangle (5,1);
\draw (5,0) rectangle (8,1);
\end{tikzpicture}
\end{document}

Edit 1: Here's an automated version. You specify the coordinates of the rectangle, the labels, the labels position and a text to be written at the center of the rectangle:
\documentclass[parskip]{scrartcl}
\usepackage[margin=15mm]{geometry}
\usepackage{tikz}
\usepackage{xifthen}
\newdimen\xfirst
\newdimen\yfirst
\newdimen\xsecond
\newdimen\ysecond
\newcommand{\ybig}{}
\newcommand{\ysmall}{}
\newcommand{\xbig}{}
\newcommand{\xsmall}{}
\newcommand{\labeledrectangle}[6]% first point, second point, first label, second label, direction (l r t b), rectangle label
{ \path (#1);
\pgfgetlastxy{\xfirst}{\yfirst};
\path (#2);
\pgfgetlastxy{\xsecond}{\ysecond};
\draw (#1) rectangle node {#6} (#2);
\ifthenelse{\lengthtest{\yfirst > \ysecond}}%
{ \xdef\ybig{\yfirst}
\xdef\ysmall{\ysecond}
}%
{ \xdef\ybig{\ysecond}
\xdef\ysmall{\yfirst}
}
\ifthenelse{\lengthtest{\xfirst > \xsecond}}%
{ \xdef\xbig{\xfirst}
\xdef\xsmall{\xsecond}
}%
{ \xdef\xbig{\xsecond}
\xdef\xsmall{\xfirst}
}
\ifthenelse{\equal{#5}{l}}
{ \node[above left] at (\xsmall,\ysmall) {#3};
\node[below left] at (\xsmall,\ybig) {#4};
}{}
\ifthenelse{\equal{#5}{r}}
{ \node[above right] at (\xbig,\ysmall) {#3};
\node[below right] at (\xbig,\ybig) {#4};
}{}
\ifthenelse{\equal{#5}{t}}
{ \node[above right] at (\xsmall,\ybig) {#3};
\node[above left] at (\xbig,\ybig) {#4};
}{}
\ifthenelse{\equal{#5}{b}}
{ \node[below right] at (\xsmall,\ysmall) {#3};
\node[below left] at (\xbig,\ysmall) {#4};
}{}
}
\begin{document}
\begin{tikzpicture}
\labeledrectangle{0.1,0.1}{3,1}{a}{b}{t}{top}
\labeledrectangle{-0.1,0.1}{-4,3}{c}{d}{l}{left}
\labeledrectangle{-0.1,-0.1}{-2.5,-2.5}{e}{f}{b}{bottom}
\labeledrectangle{0.1,-0.1}{1,-3}{g}{h}{r}{right}
\end{tikzpicture}
\begin{tikzpicture}
\labeledrectangle{0,0}{2,1}{7}{6}{t}{}
\labeledrectangle{2,0}{5,1}{5}{3}{t}{}
\labeledrectangle{5,0}{8,1}{2}{0}{t}{}
\end{tikzpicture}
\end{document}

\node[draw,rectangle, minimum width =...,minimum height=...,label=above:name]{};
. You can see tex.stackexchange.com/questions/13401/… but there are others answers about your request.