简体   繁体   English

如何编写母版页并将其链接到CSS样式表和其他网页?

[英]How do i code a master page and link it to my css style sheet and other web pages?

I am currently trying to create a website from scratch using HTML, CSS and Javascript code, which i am teaching myself. 我目前正在尝试使用HTML,CSS和Javascript代码从头开始创建网站,这些都是我自学的。 I have created a webpage and a css that link fine, however i want to have multiple pages on my website so i need a master page so that my theme layout is the same throughout. 我已经创建了一个网页和一个可以正常链接的CSS,但是我想在我的网站上有多个页面,因此我需要一个母版页,以便整个主题布局都相同。

I am using notepad (very basic i know) i using windows 7. How do i code my master page so that it links to my other pages (yet to create) and also links in my css file? 我正在使用记事本(我很基本),我正在使用Windows7。如何编码我的母版页,使其链接到我的其他页(尚未创建)以及我的CSS文件中的链接? I have saved a file in notepad along with my first page and style sheet called master.master ,however i'm not sure it is picking up all of the content correctly. 我已经将我的第一页和样式表文件保存在记事本中,称为master.master,但是我不确定它是否能正确提取所有内容。

Any advice would be helpful. 任何意见将是有益的。 Thanks 谢谢

What I understand you are doing is trying create a website with a theme running throughout each page. 据我了解,您正在尝试创建一个主题贯穿每个页面的网站。

This is what external style sheets are for. 这就是外部样式表的用途。

Basically by including this style sheet in each html page, you are giving youself the ability to style each page using the same theme. 基本上,通过在每个html页面中包含此样式表,您可以使用相同的主题为每个页面设置样式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM