Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

How do HTML & CSS work together?

user-image
Question added by jogamaya routray , Project Manager , skill avenue Pvt. Ltd
Date Posted: 2017/06/20
Nibal AbouGhattas Mhana
by Nibal AbouGhattas Mhana , Solar Systems , Home Solar

You can think of the HTML as the structure for the page, while the CSS gives the HTML it’s styling.Before we even write the CSS, we actually have to go back to our HTML. We need to write a new line to link the html file and the css file together. So, open up the html file and add this code below for example:

<!DOCTYPE html> <html> <head>   <title>This is my page title.</title>   <link href="style.css" rel="stylesheet" type="text/css" /> </head> <body>   <h1>This is a heading 1 element</h1>   <p>Hello world, this is a simple paragraph.</p> </body> <html>

 

Akheel Ahmed
by Akheel Ahmed , Data Engineer , DHL

HTML for the Content. CSS for Styling the content.

 

Quratulain Arain
by Quratulain Arain , software house , Avenaz software house

Because,

HTML = structure

CSS = style

That's why use both together...

 

Mohammed Alanazi
by Mohammed Alanazi , Services Sales Specialist & Pursuit Lead , Hewlett Packard Enerprise

In simple, HTML let you write and create the content of the page for example heading , paragraph , list and so on. CSS allow you to give a style for the web page and text too.

More Questions Like This