What is HTML and CSS used for? [Answered]
HTML was the first technology that first powered the first website. Those websites had very minimal features. Today, HTML and CSS are still in use and they do so much more. Today we will look at what each of them does.
So lets look at some of the things HTML is used for.
What is HTML is used for:
1. Publish webpages( online documents).
So whenever you open a webpage online, what your browser displays is a html file. Without html there would be no webpages.
- HTML gives content meaning using headings lists tables photos etc.: Just like any other document, HTML enables the browser and screen readers to identify if the text is a heading, a paragraph, link etc. Without html the content would be just plain, all text would have equal importance.
- HTML helps display images and table: With HTML, you can draw a table and add content inside it. You can also add pictures to a webpage which would be impossible without HTML.
2. Link to other websites and webpages.
The reason the internet became popular was the ability to link related pages and website. Well, it is HTML that provides this functionality.
3. Create forms.
HTML provide a way for users to provide input that can be sent to the server. With html forms, users can subscribe to services, do online transactions, login/ signup on websites, fill surveys, send comments and may other input related activities.
4. Add other files and applications online.
You can add a link to any file on a server for people to download. There are multitude of applications that you use daily that run on a browser. Though they other programming languages, when the information is displayed on a browser, it is in HTML format.
CSS was designed to provide a posibility of modifying the layout and styling of the webpage. We are going to look in details on some of the uses of CSS.
What is CSS used for:
1. Layout the webpage.
Using CSS, you can change the spacing and position of each specific item on a webpage. So, if you want to add spacing around an image? or do you want to add a fixed menu icon at the top? CSS is the language to use.
You can add borders of different styles around any element. You can even place one element ontop of another item with z-index and absolute positioning. So, if you are interested in building unique and interesting layouts, use CSS.
2. Setting colors of the text and background.
CSS enables us to set the color of the text and background of each individual element found on a webpage. This is very useful since you can use and maintain your brand colors across the whole website.
3. Choosing what to show on mobile or desktop
With CSS you can set your webpage such that the content are displayed diffently depending on the gadget that your viewers are using i.e. mobile phone, tablet or a desktop. CSS helps adjust the webpage according to the screen size of the displays.
4. Setting fonts types and style.
Without CSS we would be stuck with the fonts already installed and supported by the browser. Thanks to CSS and designers who make web fonts, we can be able to use other cool and custom fonts available over the internet.
5. Setting the sizes of all the components eg. images, text, video etc.
Videos and images come it various size. With CSS we can fine tune the size and even make the image adjust its size according to the container holding it. We can also adjust text size so that the readers can be able to recognise the difference between a heading and a paragraph.
Hi there! I am Avic Ndugu.
Front End Developer Newsletter
Receive a monthly Frontend Web Development newsletter.
Never any spam, easily unsubscribe any time.