To include a CSS file externally in a webpage , use the link tag. <link rel="stylesheet" type="text/css" href="style.css" /> Write this tag just after the head tag inside html tag. Sample code : <html><head><link rel="stylesheet" type="text/css" href="style.css" /></head><body><h3> Welcome </h3><p> This is my site . Here CSS file has been included externally. </p></body></html> Sample style.css file : body{ background-color: green;} h3{ color: blue; } Done. Read more
No comments:
Post a Comment