How to create an attractive person webpage within just 10 mins using HTML and CSS
You can create your own personal website including your details within just 10 minutes using only HTML and CSS. I’m gonna show you how to create an attractive webpage easily step by step.
First open any text editor and create a HTML file (with the .html extension) and another file as CSS file (with the .css extension). In the html file first link the CSS file in the <head> in the “href” attribute. You can give a suitable title for your webpage in the <title>. Write the following code in the <body> to include the basic description about yourself as below.
<link rel="stylesheet" type="text/css" href="style.css">
<img src="https://static4.depositphotos.com/1003940/348/i/600/depositphotos_3489130-stock-photo-portrait-of-beautiful-business-woman.jpg" alt="profile picture" class="box-image">
<h5>Web developer - Web designer</h5>
<p>A small description about you that would take several lines including something attractive that would make the reader to get a good understanding of yourself</p></div></body>
Here I have taken a class called “box” for the box in the middle of the background. When you write the CSS code for the “box” class it will be visible. For the link in the “source” attribute of the <img> you can use the address of the image you want and for the “alt” attribute you can use an alternative name for the image. A class called “box-image” is given here for the image. When you write the CSS code for “box-image” it will be visible in the image. In the <h1> write your name. In the <h5> write your profession. In the <p> write a small description about yourself that you want to appear in the webpage. Then you will get the output like this.
Next, in the CSS file write the following code to get a background image for the webpage and arrange it without repeating with margins and padding as you like. Here I haven’t used a margin or padding. For the URL in the background image you can use the URL of the image you like. You can use “cover” as the background size. Refer the following code for these tasks.
Next to add styles for the box in the middle of the background, you can use the following code. You can use height and width as you like for the size of the box. For the color of the box I have given the values in RGBA format. I have center-aligned the text in the box and have used “Bisque” as the color of the text and “Century Gothic” as the font of the text, you can change the values of these properties as you like. I have also arranged padding and margin accordingly.
You can find more colors from the link below https://www.w3schools.com/cssref/css_colors.asp
You can find more fonts from the link below https://www.w3schools.com/css/css_font.asp
font-family: 'Century Gothic', sans-serif;}
To add the styles to the profile picture in the box you can use the following code. You can make the shape of the image round by “border-radius” property and can arrange the height and width as you like.
Then the output will be as below.
If you like you can use the following code to add more style to the contents in the box and can change them as you wish.
Next go to the HTML file again. You can write the following code to insert your contact details(still we are writing inside the <div class= “box”>). First to insert icons and details of phone number and email you can use the following code.
<img src="https://image.flaticon.com/icons/png/512/124/124034.png" class="icon">
<p class="contactdetail">+00 000 000 000</p>
<img src="https://cdn4.vectorstock.com/i/1000x1000/23/08/gmail-new-icon-vector-34182308.jpg" class="icon">
For the icon images you can use the given URLs, but have to edit the contact details accordingly. I have defined a class as “icon” to add necessary styles for the icons and another class as “contactdetail” to make necessary changes for the details.
In the CSS file you can use following code to get the necessary styles for the above inserted icons and details.
Here “float” property is used to align the wanted aspect to left or right.
You will get the output as below.
As for the last part, for inserting the details of your Facebook, Instagram and LinkedIn profile links go to HTML file and write the following code(still inside <div class= “box”>).
<li><a href="#"><img alt="Facebook" src="https://cdn1.iconfinder.com/data/icons/logotypes/32/square-facebook-512.png" class="icon1"></a></li><li><a href="#"><img alt="Instagram" src="https://www.instagram.com/static/images/ico/apple-touch-icon-167x167-precomposed.png/4985e31c9100.png" class="icon1"></a></li><li><a href="#"><img alt="LinkedIn" src="https://icons.iconarchive.com/icons/danleech/simple/512/linkedin-icon.png" class="icon1"></a></li>
Inside the “href” attribute insert the links to your relevant profiles (Here I have used “#” mark). Inside the <img> for the “src” attribute I have used suitable icons of the social media sites. To add the necessary styles for the icons I have defined a class called “icon1”.
In the CSS file at last write the following code to style the social media icons.
If you have finished all the above coding the HTML file should look like below.
And the CSS file should look like this.
Your final output will be like this. Good Luck in making your own page!