HTML Form: Width of the text box

This entry is part 3 of 10 in the series HTML Form

Without specifying the width of the textbox, the size of the box is 20 pixels.

We can specify the size of the text box using pixel, for example 30px.

size='30px'

The HTML script will look like below.

<!DOCTYPE html>
<html>
<head lang='en'>     
    <meta charset='UTF-8'>
    <title>Codecrawl.com-Form</title>
</head>
<body>

Phone: <input type='text' name='phone' size='30px'>
Name: <input type='text' name='name'>

</body>
</html>


Width of Textbox

HTML Table: Specifying the width of a column

This entry is part 7 of 16 in the series HTML Table

Say we have a table where the first column is a running number and in the example below, an ID, which is a running number.

We would have known that we need a smaller column for this ID.

So the ID column is set at 10%,  the Artiste and Album at 45%.

<!DOCTYPE html>
<html>
<head lang='en'>     
    <meta charset='UTF-8'>
    <title>Codecrawl.com-HTML Table</title>
</head>
<body>

<table border='1' width='100%'>
    <tr>
        <th width='10%'>ID</th>
        <th width='45%'>Artiste</th>
        <th width='45%'>Album</th>
    </tr>
    <tr>
        <td>1</td>
        <td>Rod Stewart</td>
        <td>Maggie May</td>
    </tr>
</table>

</body>
</html>


Width of a column

CSS: Specifying border width and color

This entry is part 22 of 26 in the series Basic CSS

Codecrawl.com-Border
By default a border is black and 4 pixels wide.

To change the color and width, we use the following highlighted line.

<!DOCTYPE html>
<html>
<head lang='en'>     
    <meta charset='UTF-8'>
    <title>Codecrawl.com-Border</title>
</head>
<body>

<p style='border: 5px solid purple; padding: 5px'>Ushuaia</p>

<p style='border: solid'>Default</p>

</body>
</html>