We would like to know how to vertically center multi-lined text in div with a tag.
<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
div {<!--from w w w . j a v a 2s. c o m-->
width: 300px;
height: 200px;
border: 1px solid #000;
text-align: center;
display: table-cell;
vertical-align: middle;
}
</style>
</head>
<body>
<div class="div">
<a href="#">HTML (HyperText Markup Language) is the principal
markup language used for structuring web pages and formatting
content. The most recent iteration of HTML is HTML5...</a>
</div>
</body>
</html>
The code above is rendered as follows: